avcodec/pixlet: Fixes: runtime error: signed integer overflow: 9203954323419769657...
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 14 May 2017 15:02:49 +0000 (17:02 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 14 May 2017 15:03:30 +0000 (17:03 +0200)
Fixes: 1569/clusterfuzz-testcase-minimized-6328690508038144

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/pixlet.c

index ccfd267..0526264 100644 (file)
@@ -256,7 +256,7 @@ static int read_high_coeffs(AVCodecContext *avctx, uint8_t *src, int16_t *dst, i
             j = 0;
             dst += stride;
         }
-        state += (int64_t)d * yflag - ((int64_t)(d * (uint64_t)state) >> 8);
+        state += (int64_t)d * (uint64_t)yflag - ((int64_t)(d * (uint64_t)state) >> 8);
 
         flag = 0;