aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-28 21:44:32 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-02 01:14:38 +0200
commit3a0e4368ec5a9130d51fcbee32ac9ec8c30b8330 (patch)
treebcb88b7c673c4042e7d64a180104be4287a61bb5
parent22dab0f4e1b83eea1be4e6850690e9aa5d44e937 (diff)
downloadffmpeg-3a0e4368ec5a9130d51fcbee32ac9ec8c30b8330.tar.gz
avcodec/ra144: Fix runtime error: signed integer overflow: -2449 * 1398101 cannot be represented in type 'int'
Fixes: 1885/clusterfuzz-testcase-minimized-5336328549957632 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 7c845450d2daa0d066045cf94ab51cb496f1b824) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/ra144.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c
index 4f8471d28a..c869824e35 100644
--- a/libavcodec/ra144.c
+++ b/libavcodec/ra144.c
@@ -1573,7 +1573,7 @@ int ff_eval_refl(int *refl, const int16_t *coefs, AVCodecContext *avctx)
if((int)(a*(unsigned)b) != a*(int64_t)b)
return 1;
#endif
- bp1[j] = ((bp2[j] - ((refl[i+1] * bp2[i-j]) >> 12)) * b) >> 12;
+ bp1[j] = (int)((bp2[j] - ((refl[i+1] * bp2[i-j]) >> 12)) * (unsigned)b) >> 12;
}
if ((unsigned) bp1[i] + 0x1000 > 0x1fff)