aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-09-04 01:18:13 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-09-04 02:15:50 +0200
commit21d8c6612fcec630785af5c0ae087d0393bb2a8e (patch)
treeeb1304a2120509f40c6e07179f8e1feeef39215a /libavcodec
parent6ae1a32d8ac7b20099b35ff376ac92dd793b1852 (diff)
downloadffmpeg-21d8c6612fcec630785af5c0ae087d0393bb2a8e.tar.gz
avcodec/smacker: Check init_get_bits8() for failure
Fixes: CID1322314 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/smacker.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 6709f97b4a..b2fc29b138 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -316,7 +316,9 @@ static int decode_header_trees(SmackVContext *smk) {
full_size = AV_RL32(smk->avctx->extradata + 8);
type_size = AV_RL32(smk->avctx->extradata + 12);
- init_get_bits8(&gb, smk->avctx->extradata + 16, smk->avctx->extradata_size - 16);
+ ret = init_get_bits8(&gb, smk->avctx->extradata + 16, smk->avctx->extradata_size - 16);
+ if (ret < 0)
+ return ret;
if(!get_bits1(&gb)) {
av_log(smk->avctx, AV_LOG_INFO, "Skipping MMAP tree\n");