mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-19 19:03:00 +02:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user