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>
pull/36/head
Michael Niedermayer 11 years ago
commit f8932d9902
  1. 6
      libavcodec/smacker.c

@ -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…
Cancel
Save