diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-13 03:49:11 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-25 21:12:42 +0200 |
commit | fa73f547a023ab4462416462eb3c389c77c8ee94 (patch) | |
tree | c847320ae6f033806d2f12bff92c1013ea75777a /libavcodec | |
parent | c09b4dde377625d7f8a06caff71ff7120bad8f36 (diff) | |
download | ffmpeg-fa73f547a023ab4462416462eb3c389c77c8ee94.tar.gz |
jpegls: fix off limit
Fixes part of CID717913
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4acfe3d193c741126bd7f5c1a32a911e00595ecc)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/jpeglsdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c index 74714e0521..8eb9ec8d36 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++) { |