diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-12 23:49:36 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2011-09-14 10:40:31 +0300 |
commit | 6489455495fc5bfbebcfe3f57e5d4fdd6a781091 (patch) | |
tree | 8d4687e46ab722c4c7f5e1f77c92f0f917cb3314 /libavcodec | |
parent | 9676ffba8346791f494451e68d2a3b37a2918a9b (diff) | |
download | ffmpeg-streaming-6489455495fc5bfbebcfe3f57e5d4fdd6a781091.zip ffmpeg-streaming-6489455495fc5bfbebcfe3f57e5d4fdd6a781091.tar.gz |
Check for invalid VLC value in smacker decoder.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/smacker.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index 32ee39a..a841b6c 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -139,6 +139,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; |