diff options
author | Jindřich Makovička <makovick@gmail.com> | 2005-12-17 17:57:03 +0000 |
---|---|---|
committer | Jindřich Makovička <makovick@gmail.com> | 2005-12-17 17:57:03 +0000 |
commit | d76319b1ab716320f6e6a4d690b85fe4504ebd5b (patch) | |
tree | 60e46ea97983711974a83c54752d0795c9707928 /libavformat/westwood.c | |
parent | 63d33cf4390a9280b1ba42ee722f3140cf1cad3e (diff) | |
download | ffmpeg-d76319b1ab716320f6e6a4d690b85fe4504ebd5b.tar.gz |
malloc padding to avoid reading past the malloc()ed area.
Credits to Mikulas Patocka (mikulas at artax karlin mff cuni cz)
Originally committed as revision 4748 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/westwood.c')
-rw-r--r-- | libavformat/westwood.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/westwood.c b/libavformat/westwood.c index 1d3e325e4f..d9f61c717a 100644 --- a/libavformat/westwood.c +++ b/libavformat/westwood.c @@ -231,7 +231,7 @@ static int wsvqa_read_header(AVFormatContext *s, /* the VQA header needs to go to the decoder */ st->codec->extradata_size = VQA_HEADER_SIZE; - st->codec->extradata = av_malloc(VQA_HEADER_SIZE); + st->codec->extradata = av_mallocz(VQA_HEADER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); header = (unsigned char *)st->codec->extradata; if (get_buffer(pb, st->codec->extradata, VQA_HEADER_SIZE) != VQA_HEADER_SIZE) { |