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>
Sun, 27 Apr 2014 03:32:56 +0000 (05:32 +0200)
Fixes CID1194388

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

index f2f5498..df1ce1e 100644 (file)
@@ -1272,7 +1272,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];
     }