diff westwood.c @ 884:2ece9c9dd94c libavformat

malloc padding to avoid reading past the malloc()ed area. Credits to Mikulas Patocka (mikulas at artax karlin mff cuni cz)
author henry
date Sat, 17 Dec 2005 17:57:03 +0000
parents feca73904e67
children da1d5db0ce5c
line wrap: on
line diff
--- a/westwood.c	Sat Dec 17 11:27:37 2005 +0000
+++ b/westwood.c	Sat Dec 17 17:57:03 2005 +0000
@@ -231,7 +231,7 @@
 
     /* 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) {