jpeg2000dec: Add more checks when parsing headers
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
c38854c399
commit
18a245a2ae
@ -1284,6 +1284,10 @@ static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s)
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Missing SOT\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
if (!s->tile) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Missing SIZ\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
tile = s->tile + s->curtileno;
|
||||
tp = tile->tile_part + tile->tp_idx;
|
||||
|
Loading…
x
Reference in New Issue
Block a user