aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-10-20 22:35:37 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-10-23 01:00:10 +0200
commitafebdc3ed789a9aa9b08d6f741ae93d8da77b051 (patch)
tree752124dec25d9cfa780b9b31f095daa9fdfb926b
parent6e14fc4aa1a27790944d4791c5592a2fcdd727db (diff)
downloadffmpeg-afebdc3ed789a9aa9b08d6f741ae93d8da77b051.tar.gz
avcodec/jpeg2000dec: Fix off by 1 error in JPEG2000_PGOD_CPRL handling
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@niedermayer.cc> (cherry picked from commit 305e523105f6f59e7572050f19edc9f4671c036c) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/jpeg2000dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 78db783616..fc14fb3bd6 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -1159,7 +1159,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++) {