Commit 8672c0a6 authored by Michael Niedermayer's avatar Michael Niedermayer

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=80Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent aab4dbe5
......@@ -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)
......
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