aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2013-06-12 14:28:07 +0200
committerReinhard Tartler <siretart@tauware.de>2013-06-30 16:06:32 +0200
commitdb0c8061fe540bbd72146cc0c9105e30d54d7f61 (patch)
tree888be9aa5c123221ca2d2e9bbfb248d162f5b4c8
parentd7b7b10518ccd638131ef41062e1bc0c608628f7 (diff)
downloadffmpeg-db0c8061fe540bbd72146cc0c9105e30d54d7f61.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 6df8b8b619..e7c89e09f9 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -203,7 +203,8 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap)
/* 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);