diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-30 16:00:07 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-30 16:14:18 +0100 |
commit | 2c69fcc2ffe671649e56dc981e9f4cd9d46a61be (patch) | |
tree | 0454f09ddf812dd3326ebd9ec685acdcb841ba72 /libavcodec/smacker.c | |
parent | 50cbe09d8ced75422571d29bbec1f35a33a0d3ed (diff) | |
download | ffmpeg-2c69fcc2ffe671649e56dc981e9f4cd9d46a61be.tar.gz |
smacker: more complete vlc length check, fixes out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/smacker.c')
-rw-r--r-- | libavcodec/smacker.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index 095f0d0e52..e1e67da3ac 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -96,7 +96,7 @@ enum SmkBlockTypes { */ static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, uint32_t prefix, int length) { - if(length > 32) { + if(length > 32 || length > 3*SMKTREE_BITS) { av_log(NULL, AV_LOG_ERROR, "length too long\n"); return AVERROR_INVALIDDATA; } |