[FFmpeg-cvslog] snowdec: check log in get_symbol2()

Michael Niedermayer git at videolan.org
Thu Aug 16 01:50:00 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Aug 16 01:31:19 2012 +0200| [4a596d19ff2524e7d43449265554a526c06f684b] | committer: Michael Niedermayer

snowdec: check log in get_symbol2()

Fixes Ticket1635

Found-by: Piotr Bandurski <ami_stuff at o2.pl>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4a596d19ff2524e7d43449265554a526c06f684b
---

 libavcodec/snow.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/snow.h b/libavcodec/snow.h
index 7e35b5f..30e6a9a 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;



More information about the ffmpeg-cvslog mailing list