avcodec/jpeg2000dec: Check reslevelno in RPCL
Fixes out of array read Fixes Ticket4627 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a58f1bcc4c
commit
5b0f55aab9
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user