From 3129cd0140b15b80f3e7106f308ce19226ef0b1d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 13 Nov 2004 01:27:35 +0000 Subject: 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 --- libavformat/wav.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/wav.c') 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; -- cgit v1.2.3