diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-10-20 22:35:37 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-11-01 00:52:46 +0100 |
commit | 98444e0222eda0d9e1a67ac28e2822434db4175e (patch) | |
tree | 655e3d0e9fcb13b11cc965e109119f3816681b2e | |
parent | 947f7af04821555f6ee935e5735560daabbe9a14 (diff) | |
download | ffmpeg-98444e0222eda0d9e1a67ac28e2822434db4175e.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index f844d032a9..4d679a4999 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -1128,7 +1128,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++) { |