Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-10-07 19:13:26 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2019-10-25 01:22:33 +0300
commit66589d9bd9903c6be089f0bf89799314c3eb7b6a (patch)
tree239ab7e38970f1095d6a3d160cb9de34dbe745bc /libavcodec/truespeech.c
parent3948d80842f55a968a006215b62d3970cd082ee0 (diff)
avcodec/truespeech: Fix integer overflow in truespeech_synth()
Fixes: signed integer overflow: -1801695444 + -830224908 cannot be represented in type 'int' Fixes: 17995/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUESPEECH_fuzzer-5648084880588800 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/truespeech.c')
-rw-r--r--libavcodec/truespeech.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
index 799cef0945..d7c2d535e2 100644
--- a/libavcodec/truespeech.c
+++ b/libavcodec/truespeech.c
@@ -254,7 +254,7 @@ static void truespeech_synth(TSContext *dec, int16_t *out, int quart)
for(i = 0; i < 60; i++){
int sum = 0;
for(k = 0; k < 8; k++)
- sum += ptr0[k] * ptr1[k];
+ sum += ptr0[k] * (unsigned)ptr1[k];
sum = out[i] + ((sum + 0x800) >> 12);
out[i] = av_clip(sum, -0x7FFE, 0x7FFE);
for(k = 7; k > 0; k--)