aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/sierravmd.c
diff options
context:
space:
mode:
authorJindřich Makovička <makovick@gmail.com>2005-12-17 17:57:03 +0000
committerJindřich Makovička <makovick@gmail.com>2005-12-17 17:57:03 +0000
commitd76319b1ab716320f6e6a4d690b85fe4504ebd5b (patch)
tree60e46ea97983711974a83c54752d0795c9707928 /libavformat/sierravmd.c
parent63d33cf4390a9280b1ba42ee722f3140cf1cad3e (diff)
downloadffmpeg-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/sierravmd.c')
-rw-r--r--libavformat/sierravmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/sierravmd.c b/libavformat/sierravmd.c
index bc69c0ecd1..4037614b8a 100644
--- a/libavformat/sierravmd.c
+++ b/libavformat/sierravmd.c
@@ -137,7 +137,7 @@ static int vmd_read_header(AVFormatContext *s,
st->codec->width = LE_16(&vmd->vmd_header[12]);
st->codec->height = LE_16(&vmd->vmd_header[14]);
st->codec->extradata_size = VMD_HEADER_SIZE;
- st->codec->extradata = av_malloc(VMD_HEADER_SIZE);
+ st->codec->extradata = av_mallocz(VMD_HEADER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
memcpy(st->codec->extradata, vmd->vmd_header, VMD_HEADER_SIZE);
/* if sample rate is 0, assume no audio */