Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-12 17:31:12 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-09-12 18:17:32 +0400
commit59a08d193963ba3455b8c8b8a7b1b620e13b8e8f (patch)
tree930785a7418613b3cb6858159e16fe40d76718f3 /libavcodec/smacker.c
parentd2d96f9e47d62f151d7217b0c1393761c6e2b240 (diff)
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>
Diffstat (limited to 'libavcodec/smacker.c')
-rw-r--r--libavcodec/smacker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 899ba23e90..b5712a6ea5 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -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;
}