mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avcodec/jpeg2000dec: Skip init for component in CPRL if nothing is to be done
Fixes: assertion failure
Fixes: 7949/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-4819602782552064
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 a96c131eb5
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
02f4e846d2
commit
4e9e1ab815
@ -1124,6 +1124,9 @@ static int jpeg2000_decode_packets_po_iteration(Jpeg2000DecoderContext *s, Jpeg2
|
||||
step_x = 32;
|
||||
step_y = 32;
|
||||
|
||||
if (RSpoc > FFMIN(codsty->nreslevels, REpoc))
|
||||
continue;
|
||||
|
||||
for (reslevelno = RSpoc; reslevelno < FFMIN(codsty->nreslevels, REpoc); reslevelno++) {
|
||||
uint8_t reducedresno = codsty->nreslevels - 1 -reslevelno; // ==> N_L - r
|
||||
Jpeg2000ResLevel *rlevel = comp->reslevel + reslevelno;
|
||||
|
Loading…
Reference in New Issue
Block a user