Skip to content
Snippets Groups Projects
Commit 59a08d19 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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: default avatarMichael Niedermayer <michaelni@gmx.at>
parent d2d96f9e
No related branches found
No related tags found
No related merge requests found
...@@ -102,7 +102,7 @@ static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, uint32_t pref ...@@ -102,7 +102,7 @@ static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, uint32_t pref
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
if(!get_bits1(gb)){ //Leaf if(!get_bits1(gb)){ //Leaf
if(hc->current >= 256){ if(hc->current >= hc->length){
av_log(NULL, AV_LOG_ERROR, "Tree size exceeded!\n"); av_log(NULL, AV_LOG_ERROR, "Tree size exceeded!\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment