Commit c08b06c2 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/jpeg2000dec: Check that step_x/y are valid before use in JPEG2000_PGOD_PCRL

Fixes: CID1322305 and CID1322304
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 49f4967d
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment