diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2013-06-12 16:28:07 +0400 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-06-16 17:57:31 +0400 |
commit | 58c95448e42d34910b939363949ba1a92c06b0b0 (patch) | |
tree | 95829b8e101eccc959d3ef29acaec0fad73cb327 /libavformat/smacker.c | |
parent | bbb2945f2dfbc2306c1655bf7eb6e220912a9a7c (diff) |
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>
Diffstat (limited to 'libavformat/smacker.c')
-rw-r--r-- | libavformat/smacker.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/smacker.c b/libavformat/smacker.c index fcca5c6e3a..7eed34d516 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); |