mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/jpeg2000dec: Check that step_x/y are valid before use in JPEG2000_PGOD_PCRL
Fixes: CID1322305 and CID1322304 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
49f4967dd0
commit
c08b06c225
@ -1244,6 +1244,10 @@ static int jpeg2000_decode_packets_po_iteration(Jpeg2000DecoderContext *s, Jpeg2
|
||||
step_y = FFMIN(step_y, rlevel->log2_prec_height + reducedresno);
|
||||
}
|
||||
}
|
||||
if (step_x >= 31 || step_y >= 31){
|
||||
avpriv_request_sample(s->avctx, "PCRL with large step");
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
step_x = 1<<step_x;
|
||||
step_y = 1<<step_y;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user