aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-07-29 15:55:36 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-08-01 13:54:43 +0200
commitb2d9d7226943d6229a17e31714ce5162bdf88b33 (patch)
tree8da345600251c0a5bb911caccb41d5aa3078639d
parent880f5c59139e1d85d3a0b3433103f3fea17ff2d3 (diff)
downloadffmpeg-b2d9d7226943d6229a17e31714ce5162bdf88b33.tar.gz
avcodec/diracdsp: fix integer overflow
Fixes: runtime error: signed integer overflow: 11 * 225726413 cannot be represented in type 'int' Fixes: 2764/clusterfuzz-testcase-minimized-5382561922547712 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/diracdsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/diracdsp.c b/libavcodec/diracdsp.c
index cd1209e209..8bc79b788c 100644
--- a/libavcodec/diracdsp.c
+++ b/libavcodec/diracdsp.c
@@ -199,7 +199,7 @@ static void dequant_subband_ ## PX ## _c(uint8_t *src, uint8_t *dst, ptrdiff_t s
for (i = 0; i < tot_h; i++) { \
c = *src_r++; \
sign = FFSIGN(c)*(!!c); \
- c = (FFABS(c)*qf + qs) >> 2; \
+ c = (FFABS(c)*(unsigned)qf + qs) >> 2; \
*dst_r++ = c*sign; \
} \
src += tot_h << (sizeof(PX) >> 1); \