[FFmpeg-cvslog] avcodec/mjpegdec: make type of shift unsigned to avoid undefined behavior
Michael Niedermayer
git at videolan.org
Mon Apr 28 00:30:46 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Apr 28 00:16:42 2014 +0200| [e31727bd53fc69ace0373deabf48360ac6af94ec] | committer: Michael Niedermayer
avcodec/mjpegdec: make type of shift unsigned to avoid undefined behavior
Found-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e31727bd53fc69ace0373deabf48360ac6af94ec
---
libavcodec/mjpegdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index df1ce1e..6b1a03b 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1272,7 +1272,7 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss,
}
if (!Al) {
- s->coefs_finished[c] |= (2LL << se) - (1LL << ss);
+ s->coefs_finished[c] |= (2ULL << se) - (1ULL << ss);
last_scan = !~s->coefs_finished[c];
}
More information about the ffmpeg-cvslog
mailing list