From 4a596d19ff2524e7d43449265554a526c06f684b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 16 Aug 2012 01:31:19 +0200 Subject: [PATCH] snowdec: check log in get_symbol2() Fixes Ticket1635 Found-by: Piotr Bandurski Signed-off-by: Michael Niedermayer --- libavcodec/snow.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/snow.h b/libavcodec/snow.h index 7e35b5f1be..30e6a9a485 100644 --- a/libavcodec/snow.h +++ b/libavcodec/snow.h @@ -582,7 +582,7 @@ static inline int get_symbol2(RangeCoder *c, uint8_t *state, int log2){ av_assert2(log2>=-4); - while(get_rac(c, state+4+log2)){ + while(log2<28 && get_rac(c, state+4+log2)){ v+= r; log2++; if(log2>0) r+=r;