summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/wavdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 256c36ebe2..ef144502a2 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -71,7 +71,7 @@ static void set_spdif(AVFormatContext *s, WAVDemuxContext *wav)
int ret = ffio_ensure_seekback(s->pb, len);
if (ret >= 0) {
- uint8_t *buf = av_malloc(len);
+ uint8_t *buf = av_malloc(len + AV_INPUT_BUFFER_PADDING_SIZE);
if (!buf) {
ret = AVERROR(ENOMEM);
} else {