aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-13 03:49:11 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-13 03:54:04 +0200
commit4acfe3d193c741126bd7f5c1a32a911e00595ecc (patch)
treef08cd7566597ca6c3a6ac8444d17fc5c53d9b33e /libavcodec
parent9f9307ff2a6cc769abea857a1c8535a3991bfe2c (diff)
downloadffmpeg-4acfe3d193c741126bd7f5c1a32a911e00595ecc.tar.gz
jpegls: fix off limit
Fixes part of CID717913 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/jpeglsdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index db230cf8e8..516a82fc90 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++) {