mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2025-03-03 09:37:28 +00: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);
|
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_x = 1<<step_x;
|
||||||
step_y = 1<<step_y;
|
step_y = 1<<step_y;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user