[FFmpeg-cvslog] Check for invalid VLC value in smacker decoder.
Laurent Aimar
git at videolan.org
Sun Dec 25 01:36:01 CET 2011
ffmpeg | branch: release/0.6 | Laurent Aimar <fenrir at videolan.org> | Mon Sep 12 23:49:36 2011 +0200| [117e04cdfa814d2ce4ce46dd925ec5257614d265] | committer: Reinhard Tartler
Check for invalid VLC value in smacker decoder.
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit 6489455495fc5bfbebcfe3f57e5d4fdd6a781091)
Signed-off-by: Anton Khirnov <anton at khirnov.net>
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=117e04cdfa814d2ce4ce46dd925ec5257614d265
---
libavcodec/smacker.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 1af206f..0424481 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -138,6 +138,8 @@ static int smacker_decode_bigtree(GetBitContext *gb, HuffContext *hc, DBCtx *ctx
b2 = get_bits_count(gb);
i2 = ctx->v2->table ? get_vlc2(gb, ctx->v2->table, SMKTREE_BITS, 3) : 0;
b2 = get_bits_count(gb) - b2;
+ if (i1 < 0 || i2 < 0)
+ return -1;
val = ctx->recode1[i1] | (ctx->recode2[i2] << 8);
if(val == ctx->escapes[0]) {
ctx->last[0] = hc->current;
More information about the ffmpeg-cvslog
mailing list