snowdec: check log in get_symbol2()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 15 Aug 2012 23:31:19 +0000 (01:31 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 15 Aug 2012 23:31:19 +0000 (01:31 +0200)
Fixes Ticket1635

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/snow.h

index 7e35b5f..30e6a9a 100644 (file)
@@ -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;