[FFmpeg-cvslog] smacker: pad the extradata allocation
Kostya Shishkov
git at videolan.org
Tue Aug 27 15:59:06 CEST 2013
ffmpeg | branch: release/1.1 | Kostya Shishkov <kostya.shishkov at gmail.com> | Wed Jun 12 14:28:07 2013 +0200| [71b8ef938c1ec4aedc6459ec7338a4abf0f807b8] | committer: Luca Barbato
smacker: pad the extradata allocation
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
(cherry picked from commit 4c22baf65363433f8c20efd1022b4ba2d8cf2288)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=71b8ef938c1ec4aedc6459ec7338a4abf0f807b8
---
libavformat/smacker.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index 17c7c52..df074a4 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -210,7 +210,8 @@ static int smacker_read_header(AVFormatContext *s)
/* load trees to extradata, they will be unpacked by decoder */
- st->codec->extradata = av_malloc(smk->treesize + 16);
+ st->codec->extradata = av_mallocz(smk->treesize + 16 +
+ FF_INPUT_BUFFER_PADDING_SIZE);
st->codec->extradata_size = smk->treesize + 16;
if(!st->codec->extradata){
av_log(s, AV_LOG_ERROR, "Cannot allocate %i bytes of extradata\n", smk->treesize + 16);
More information about the ffmpeg-cvslog
mailing list