avcodec/jpeg2000dec: Assert that step_x/y are valid

Fixes CID1322304, CID1322305

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2015-09-05 00:28:36 +02:00
parent 205c31b301
commit 9e70475551

View File

@ -1111,6 +1111,7 @@ static int jpeg2000_decode_packets_po_iteration(Jpeg2000DecoderContext *s, Jpeg2
step_x = FFMIN(step_x, rlevel->log2_prec_width + reducedresno);
step_y = FFMIN(step_y, rlevel->log2_prec_height + reducedresno);
}
av_assert0(step_x < 32 && step_y < 32);
step_x = 1<<step_x;
step_y = 1<<step_y;