[FFmpeg-devel] [PATCH 1/2] avcodec/jpeg2000dec: Fix off by 1 error in JPEG2000_PGOD_CPRL handling
Michael Niedermayer
michael at niedermayer.cc
Sun Oct 21 01:35:11 EEST 2018
Fixes: assertion failure
Fixes: 10785/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5672160496975872
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavcodec/jpeg2000dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 96dab8e176..5b07f07aa9 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -1162,7 +1162,7 @@ static int jpeg2000_decode_packets_po_iteration(Jpeg2000DecoderContext *s, Jpeg2
step_x = 32;
step_y = 32;
- if (RSpoc > FFMIN(codsty->nreslevels, REpoc))
+ if (RSpoc >= FFMIN(codsty->nreslevels, REpoc))
continue;
for (reslevelno = RSpoc; reslevelno < FFMIN(codsty->nreslevels, REpoc); reslevelno++) {
--
2.19.1
More information about the ffmpeg-devel
mailing list