[FFmpeg-cvslog] jpegls: fix off limit
Michael Niedermayer
git at videolan.org
Thu Oct 25 21:29:19 CEST 2012
ffmpeg | branch: release/0.10 | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 13 03:49:11 2012 +0200| [fa73f547a023ab4462416462eb3c389c77c8ee94] | committer: Michael Niedermayer
jpegls: fix off limit
Fixes part of CID717913
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 4acfe3d193c741126bd7f5c1a32a911e00595ecc)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fa73f547a023ab4462416462eb3c389c77c8ee94
---
libavcodec/jpeglsdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index 74714e0..8eb9ec8 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
@@ -290,7 +290,7 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, int point_transfor
// av_log(s->avctx, AV_LOG_DEBUG, "JPEG params: ILV=%i Pt=%i BPP=%i, scan = %i\n", ilv, point_transform, s->bits, s->cur_scan);
if(ilv == 0) { /* separate planes */
stride = (s->nb_components > 1) ? 3 : 1;
- off = av_clip(s->cur_scan - 1, 0, stride);
+ off = av_clip(s->cur_scan - 1, 0, stride - 1);
width = s->width * stride;
cur += off;
for(i = 0; i < s->height; i++) {
More information about the ffmpeg-cvslog
mailing list