summaryrefslogtreecommitdiff
path: root/libavformat/smacker.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-22 11:23:58 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-22 11:23:58 +0200
commit2a59abf1a8859bd63f5760e98ffcb381d407451d (patch)
tree65e855acaed76b644ddc3e07e90732e28826931d /libavformat/smacker.c
parentf7c67536fe56336b9c6dcbc87162394c7feb18a5 (diff)
downloadffmpeg-2a59abf1a8859bd63f5760e98ffcb381d407451d.tar.gz
smackerdemux: Allocate padding for extradata
Fixes slight overread. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/smacker.c')
-rw-r--r--libavformat/smacker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index a3545f4ac7..84a53ea3c8 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -203,7 +203,7 @@ 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_malloc(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);