avcodec/mjpegdec: Fix undefined shift
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 27 Apr 2014 03:32:56 +0000 (05:32 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 23 Jun 2014 16:17:42 +0000 (18:17 +0200)
Fixes CID1194388

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b4329605289e25bb071ec1c1182bf25fc83b09aa)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mjpegdec.c

index 27b0e5b..b9c6950 100644 (file)
@@ -1144,7 +1144,7 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss,
     }
 
     if (!Al) {
-        s->coefs_finished[c] |= (1LL << (se + 1)) - (1LL << ss);
+        s->coefs_finished[c] |= (2LL << se) - (1LL << ss);
         last_scan = !~s->coefs_finished[c];
     }