]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/jpeg2000dec: Skip de-quantization of empty areas
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 19 Mar 2019 16:10:42 +0000 (17:10 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 25 Mar 2019 12:20:30 +0000 (13:20 +0100)
Fixes: Timeout (26sec -> 18sec)
Fixes: 13448/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-576903098243481
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/jpeg2000dec.c

index a4291bc06b8308822d7b8f37a2fb5159ff7933f5..7749c980e5c56d684a84dc07db2b2715379263cd 100644 (file)
@@ -1730,6 +1730,8 @@ static inline void tile_codeblocks(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile
                                     bandpos);
                         if (ret)
                             coded = 1;
+                        else
+                            continue;
                         x = cblk->coord[0][0] - band->coord[0][0];
                         y = cblk->coord[1][0] - band->coord[1][0];