aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-10 23:48:30 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-14 00:21:49 +0200
commit4a974cb59501d9da0c33c41f93eb596dc6cdc3fb (patch)
tree0e67100a77ba5b2243b39b50f9d8587e0d5fe474
parent924a2dd57a04792fae1dce1626fafb223fb97201 (diff)
downloadffmpeg-4a974cb59501d9da0c33c41f93eb596dc6cdc3fb.tar.gz
avcodec/pixlet: Fix runtime error: signed integer overflow: 436207616 * -5160230545260541 cannot be represented in type 'long'
Fixes: 1462/clusterfuzz-testcase-minimized-6558894463647744 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 60765cc42e3eb4a1193ef352a89946113a6e5802) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/pixlet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pixlet.c b/libavcodec/pixlet.c
index c4f7597866..419fef6102 100644
--- a/libavcodec/pixlet.c
+++ b/libavcodec/pixlet.c
@@ -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 - (d * state >> 8);
+ state += (int64_t)d * yflag - ((int64_t)(d * (uint64_t)state) >> 8);
flag = 0;