diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-10-07 18:13:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-10-25 00:22:33 +0200 |
commit | 66589d9bd9903c6be089f0bf89799314c3eb7b6a (patch) | |
tree | 239ab7e38970f1095d6a3d160cb9de34dbe745bc /libavcodec/truespeech.c | |
parent | 3948d80842f55a968a006215b62d3970cd082ee0 (diff) | |
download | ffmpeg-66589d9bd9903c6be089f0bf89799314c3eb7b6a.tar.gz |
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.c | 2 |
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--) |