From d76319b1ab716320f6e6a4d690b85fe4504ebd5b Mon Sep 17 00:00:00 2001 From: Jindřich Makovička Date: Sat, 17 Dec 2005 17:57:03 +0000 Subject: 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 --- libavformat/westwood.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/westwood.c') 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) { -- cgit v1.2.3