summaryrefslogtreecommitdiffstats
path: root/libavcodec/hqxdsp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-14 14:06:56 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-14 15:30:08 +0200
commitb923213276777f33d6366b1cb9d1845a8658f365 (patch)
tree35a8b5d038c5292567fcd3cc890f1b300b74a43e /libavcodec/hqxdsp.c
parentf2c539d3501111f10a2b4e9480ea54c0a3190680 (diff)
downloadffmpeg-streaming-b923213276777f33d6366b1cb9d1845a8658f365.zip
ffmpeg-streaming-b923213276777f33d6366b1cb9d1845a8658f365.tar.gz
avcodec/hqxdsp: Fix runtime error: signed integer overflow: -196264 * 11585 cannot be represented in type 'int'
Fixes: 1568/clusterfuzz-testcase-minimized-5944868608147456 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/hqxdsp.c')
-rw-r--r--libavcodec/hqxdsp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/hqxdsp.c b/libavcodec/hqxdsp.c
index 04a65e7..7f8044e 100644
--- a/libavcodec/hqxdsp.c
+++ b/libavcodec/hqxdsp.c
@@ -47,8 +47,8 @@ static inline void idct_col(int16_t *blk, const uint8_t *quant)
t5 = t1 * 2 + t3;
t6 = t2 - t3;
t7 = t3 * 2 + t6;
- t8 = (t6 * 11585) >> 14;
- t9 = (t7 * 11585) >> 14;
+ t8 = (int)(t6 * 11585U) >> 14;
+ t9 = (int)(t7 * 11585U) >> 14;
tA = (int)(s2 * 8867U - s6 * 21407U) >> 14;
tB = (int)(s6 * 8867U + s2 * 21407U) >> 14;
tC = (s0 >> 1) - (s4 >> 1);
OpenPOWER on IntegriCloud