mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +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:
parent
d2d96f9e47
commit
59a08d1939
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user