summaryrefslogtreecommitdiff
path: root/libavcodec/hq_hqadsp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-13 01:12:35 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-13 01:15:29 +0200
commite66488252335d3e7870c72d1ac7040e8c1853f07 (patch)
treeab0e3d8d7893d162b8c847f199d03636087da708 /libavcodec/hq_hqadsp.c
parent5ac17f187ae6ec97ad41b763f999bd99782c37aa (diff)
avcodec/hq_hqadsp: Fix runtime error: signed integer overflow: 80359 * 30274 cannot be represented in type 'int'
Fixes: 1507/clusterfuzz-testcase-minimized-4955228300378112 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/hq_hqadsp.c')
-rw-r--r--libavcodec/hq_hqadsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hq_hqadsp.c b/libavcodec/hq_hqadsp.c
index db1ea2e246..1b9f138c72 100644
--- a/libavcodec/hq_hqadsp.c
+++ b/libavcodec/hq_hqadsp.c
@@ -30,7 +30,7 @@
#define FIX_1_414 23170
#define FIX_2_613 21407 // divided by two to fit the range
-#define IDCTMUL(a, b) ((a) * (b) >> 16)
+#define IDCTMUL(a, b) ((int)((a) * (unsigned)(b)) >> 16)
static inline void idct_row(int16_t *blk)
{