avcodec/smacker: Check init_get_bits8() for failure

Fixes: CID1322314

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2015-09-04 01:18:13 +02:00
parent 6ae1a32d8a
commit 21d8c6612f
1 changed files with 3 additions and 1 deletions

View File

@ -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");