aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/snowdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-08-28 00:30:33 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-08-29 21:16:32 +0200
commit732f9764561558a388c05483ed6a722a5c67b05c (patch)
tree9aa74521ca66aecba8522a4fc3d896225c828445 /libavcodec/snowdec.c
parent2a83866c9f9531eb096c9b9fe0550e742b931ad1 (diff)
downloadffmpeg-732f9764561558a388c05483ed6a722a5c67b05c.tar.gz
avcodec/snowdec: Fix integer overflow in decode_subband_slice_buffered()
Fixes: runtime error: signed integer overflow: 267 * 8388608 cannot be represented in type 'int' Fixes: 2743/clusterfuzz-testcase-minimized-5820652076400640 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/snowdec.c')
-rw-r--r--libavcodec/snowdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c
index 734f43e7d1..b74c468ce3 100644
--- a/libavcodec/snowdec.c
+++ b/libavcodec/snowdec.c
@@ -140,7 +140,7 @@ static inline void decode_subband_slice_buffered(SnowContext *s, SubBand *b, sli
v = b->x_coeff[new_index].coeff;
x = b->x_coeff[new_index++].x;
while(x < w){
- register int t= ( (v>>1)*qmul + qadd)>>QEXPSHIFT;
+ register int t= (int)( (v>>1)*(unsigned)qmul + qadd)>>QEXPSHIFT;
register int u= -(v&1);
line[x] = (t^u) - u;