Commit 59a08d19 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/smacker: use the correct field instead of a hardcoded value for the...

avcodec/smacker: use the correct field instead of a hardcoded value for the index check in smacker_decode_tree()
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d2d96f9e
......@@ -102,7 +102,7 @@ static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, uint32_t pref
return AVERROR_INVALIDDATA;
}
if(!get_bits1(gb)){ //Leaf
if(hc->current >= 256){
if(hc->current >= hc->length){
av_log(NULL, AV_LOG_ERROR, "Tree size exceeded!\n");
return AVERROR_INVALIDDATA;
}
......
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