avcodec/jpeg2000dec: Limit x/y step to 1<<30
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 24 Jun 2015 22:43:49 +0000 (00:43 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 24 Jun 2015 22:43:49 +0000 (00:43 +0200)
Fixes infinite loop
Fixes Ticket4663

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/jpeg2000dec.c

index 1901127..3d518e3 100644 (file)
@@ -1075,9 +1075,8 @@ static int jpeg2000_decode_packets(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile
         ok_reslevel = 1;
         for (reslevelno = 0; ok_reslevel; reslevelno++) {
             ok_reslevel = 0;
-
-            step_x = 32;
-            step_y = 32;
+            step_x = 30;
+            step_y = 30;
             for (compno = 0; compno < s->ncomponents; compno++) {
                 Jpeg2000Component *comp     = tile->comp + compno;
                 Jpeg2000CodingStyle *codsty = tile->codsty + compno;