Commit 9e704755 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/jpeg2000dec: Assert that step_x/y are valid

Fixes CID1322304, CID1322305
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 205c31b3
...@@ -1111,6 +1111,7 @@ static int jpeg2000_decode_packets_po_iteration(Jpeg2000DecoderContext *s, Jpeg2 ...@@ -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_x = FFMIN(step_x, rlevel->log2_prec_width + reducedresno);
step_y = FFMIN(step_y, rlevel->log2_prec_height + 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_x = 1<<step_x;
step_y = 1<<step_y; step_y = 1<<step_y;
......
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