aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-08-25 17:49:15 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-01-06 11:30:43 +0100
commiteec70d9fbeb7f7d0d060326e3f881bca27f99b17 (patch)
tree23e377b1744a82fae56676abe46652f6fe129ec1 /libavcodec
parent2348a24c363e5e3def0aa3ae5c19d11e5bf06a01 (diff)
downloadffmpeg-eec70d9fbeb7f7d0d060326e3f881bca27f99b17.tar.gz
avcodec/takdec: Fix integer overflow in decorrelate()
Fixes: signed integer overflow: -2424832 - 2145653689 cannot be represented in type 'int' Fixes: 16138/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5643451346976768 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 f1192736494a5b16717de66da4a3d3c6af0e9a7a) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/takdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index 0439a3ac9b..4fb5825532 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -653,7 +653,7 @@ static int decorrelate(TAKDecContext *s, int c1, int c2, int length)
s->residues[i ] * s->filter[0];
}
- v = av_clip_intp2(v >> 10, 13) * (1 << dshift) - *p1;
+ v = av_clip_intp2(v >> 10, 13) * (1U << dshift) - *p1;
*p1++ = v;
}