summaryrefslogtreecommitdiff
path: root/libavformat/wav.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-11-13 01:27:35 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-11-13 01:27:35 +0000
commit3129cd0140b15b80f3e7106f308ce19226ef0b1d (patch)
treead5a8bd791f5ae7e0cefd246a564b2cd35a22b84 /libavformat/wav.c
parent4940ed6ae12e47a6cab496c3f32326fc39ab4b7b (diff)
allocate a few bytes more for extradata so the bitstream reader if its used by the codec for parsing extardata, doesnt read over the end
Originally committed as revision 3679 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/wav.c')
-rw-r--r--libavformat/wav.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/wav.c b/libavformat/wav.c
index 3497126e67..f2bb503b21 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -154,7 +154,7 @@ void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size)
if (codec->extradata_size > 0) {
if (codec->extradata_size > size - 18)
codec->extradata_size = size - 18;
- codec->extradata = av_mallocz(codec->extradata_size);
+ codec->extradata = av_mallocz(codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
get_buffer(pb, codec->extradata, codec->extradata_size);
} else
codec->extradata_size = 0;