Commit 5b0f55aa authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/jpeg2000dec: Check reslevelno in RPCL

Fixes out of array read
Fixes Ticket4627
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a58f1bcc
......@@ -1102,6 +1102,9 @@ static int jpeg2000_decode_packets(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile
int xc = x / s->cdx[compno];
int yc = y / s->cdy[compno];
if (reslevelno >= codsty->nreslevels)
continue;
if (yc % (1 << (rlevel->log2_prec_height + reducedresno)))
continue;
......
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