aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2013-06-12 14:28:07 +0200
committerLuca Barbato <lu_zero@gentoo.org>2013-06-16 15:58:27 +0200
commit71b8ef938c1ec4aedc6459ec7338a4abf0f807b8 (patch)
treeb37abe8b09c424b6c62c86b7882f42da0a7c82bd
parent5e6122ddadae542350933c2077434f17d51587a7 (diff)
downloadffmpeg-71b8ef938c1ec4aedc6459ec7338a4abf0f807b8.tar.gz
smacker: pad the extradata allocation
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org> (cherry picked from commit 4c22baf65363433f8c20efd1022b4ba2d8cf2288) Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r--libavformat/smacker.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index 17c7c529e7..df074a4c5d 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);