[FFmpeg-cvslog] avcodec/jpeg2000dec: Assert that step_x/y are valid
Michael Niedermayer
git at videolan.org
Sat Sep 5 00:48:08 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Sep 5 00:28:36 2015 +0200| [9e704755515f504f4d454a1349a82885547d77ab] | committer: Michael Niedermayer
avcodec/jpeg2000dec: Assert that step_x/y are valid
Fixes CID1322304, CID1322305
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9e704755515f504f4d454a1349a82885547d77ab
---
libavcodec/jpeg2000dec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 66c5375..8a803e7 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -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;
More information about the ffmpeg-cvslog
mailing list