1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/jpeg2000dec: Limit poc end fields to whats available in jpeg2000_decode_packets()

Fixes: Ticket4677

Solution based on information from
https://code.google.com/p/openjpeg/issues/detail?id=80

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-06-27 11:48:42 +02:00
parent aab4dbe534
commit 8672c0a643

View File

@ -1309,7 +1309,9 @@ static int jpeg2000_decode_packets(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile
Jpeg2000POCEntry *e = &tile->poc.poc[i];
ret = jpeg2000_decode_packets_po_iteration(s, tile,
e->RSpoc, e->CSpoc,
e->LYEpoc, e->REpoc, e->CEpoc,
FFMIN(e->LYEpoc, tile->codsty[0].nlayers),
e->REpoc,
FFMIN(e->CEpoc, s->ncomponents),
e->Ppoc, &tp_index
);
if (ret < 0)