[FFmpeg-cvslog] jpegls: fix off limit
Michael Niedermayer
git at videolan.org
Sat Oct 13 04:00:28 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 13 03:49:11 2012 +0200| [4acfe3d193c741126bd7f5c1a32a911e00595ecc] | committer: Michael Niedermayer
jpegls: fix off limit
Fixes part of CID717913
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4acfe3d193c741126bd7f5c1a32a911e00595ecc
---
libavcodec/jpeglsdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index db230cf..516a82f 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
@@ -295,7 +295,7 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, int point_transfor
}
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