Skip to content
Snippets Groups Projects
Commit 780669ef authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avcodec/jpeg2000dec: non zero image offsets are not supported


Fixes out of array accesses
Fixes Ticket3080
Found-by: ami_stuff
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 3c9dd93f
No related branches found
No related tags found
No related merge requests found
......@@ -243,6 +243,11 @@ static int get_siz(Jpeg2000DecoderContext *s)
s->tile_offset_y = bytestream2_get_be32u(&s->g); // YT0Siz
ncomponents = bytestream2_get_be16u(&s->g); // CSiz
if (s->image_offset_x || s->image_offset_y) {
avpriv_request_sample(s->avctx, "Support for image offsets");
return AVERROR_PATCHWELCOME;
}
if (ncomponents <= 0) {
av_log(s->avctx, AV_LOG_ERROR, "Invalid number of components: %d\n",
s->ncomponents);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment