1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/smacker: use the correct field instead of a hardcoded value for the index check in smacker_decode_tree()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-12 15:31:12 +02:00
parent d2d96f9e47
commit 59a08d1939

View File

@ -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;
}