[FFmpeg-cvslog] avcodec/jpeg2000dec: Check reslevelno in RPCL
Michael Niedermayer
git at videolan.org
Mon Jun 15 03:11:04 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jun 15 03:00:53 2015 +0200| [5b0f55aab9d5802556e7b3a09c50b77a3220b658] | committer: Michael Niedermayer
avcodec/jpeg2000dec: Check reslevelno in RPCL
Fixes out of array read
Fixes Ticket4627
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5b0f55aab9d5802556e7b3a09c50b77a3220b658
---
libavcodec/jpeg2000dec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index d5abc42..d00ef10 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -1102,6 +1102,9 @@ static int jpeg2000_decode_packets(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile
int xc = x / s->cdx[compno];
int yc = y / s->cdy[compno];
+ if (reslevelno >= codsty->nreslevels)
+ continue;
+
if (yc % (1 << (rlevel->log2_prec_height + reducedresno)))
continue;
More information about the ffmpeg-cvslog
mailing list