From e31727bd53fc69ace0373deabf48360ac6af94ec Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 28 Apr 2014 00:16:42 +0200 Subject: avcodec/mjpegdec: make type of shift unsigned to avoid undefined behavior MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found-by: Reimar Döffinger Signed-off-by: Michael Niedermayer --- libavcodec/mjpegdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec') 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]; } -- cgit v1.1