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 14:51:09 +0000 (16:51 +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 ad00323..ddf6467 100644 (file)
@@ -1229,7 +1229,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];
     }