Merge commit '0679cec6e8802643bbe6d5f68ca1110a7d3171da'
* commit '0679cec6e8802643bbe6d5f68ca1110a7d3171da':
smacker: Make sure we don't fill in huffman codes out of range
Conflicts:
libavcodec/smacker.c
See: 1285baaab5
the added test is redundant but will be used after future refactoring
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
f8932d9902
@ -284,6 +284,12 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int
|
||||
av_log(smk->avctx, AV_LOG_ERROR, "bigtree damaged\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
if (ctx.last[0] >= huff.length ||
|
||||
ctx.last[1] >= huff.length ||
|
||||
ctx.last[2] >= huff.length) {
|
||||
av_log(smk->avctx, AV_LOG_ERROR, "Huffman codes out of range\n");
|
||||
err = AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
*recodes = huff.values;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user