[FFmpeg-cvslog] avcodec/jpeg2000dec: Limit x/y step to 1<<30

Michael Niedermayer git at videolan.org
Thu Jun 25 01:16:44 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Jun 25 00:43:49 2015 +0200| [9ff5e7974a8fe32c3b595a481c06a41fa316a9ac] | committer: Michael Niedermayer

avcodec/jpeg2000dec: Limit x/y step to 1<<30

Fixes infinite loop
Fixes Ticket4663

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/jpeg2000dec.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 1901127..3d518e3 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -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;



More information about the ffmpeg-cvslog mailing list