Commit f8932d99 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '0679cec6'

* commit '0679cec6':
  smacker: Make sure we don't fill in huffman codes out of range

Conflicts:
	libavcodec/smacker.c

See: 1285baaa
the added test is redundant but will be used after future refactoring
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents d510d70d 0679cec6
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment