avcodec/jpeg2000dec: Check for reduction factor and image offset

This combination is not working (it writes out of array)
Reviewed-by: 's avatarTomas Härdin <git@haerdin.se>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 6ff95758
......@@ -238,6 +238,11 @@ static int get_siz(Jpeg2000DecoderContext *s)
return AVERROR_INVALIDDATA;
}
if (s->reduction_factor && (s->image_offset_x || s->image_offset_y) ){
av_log(s->avctx, AV_LOG_ERROR, "reduction factor with image offsets is not fully implemented");
return AVERROR_PATCHWELCOME;
}
s->ncomponents = ncomponents;
if (s->tile_width <= 0 || s->tile_height <= 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