diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-21 16:38:00 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-21 19:05:04 +0100 |
commit | a59505ca76718549dfc51b9622e2d88cb60f33b5 (patch) | |
tree | 07e216c109927d187c745e995c8e93353ed06602 /libavcodec | |
parent | 0c42d0add37c8a41bc75179efe0571305d9165d1 (diff) | |
download | ffmpeg-a59505ca76718549dfc51b9622e2d88cb60f33b5.tar.gz |
avcodec/gsmdec_template: Fix runtime error: signed integer overflow: -22527 * 99113 cannot be represented in type 'int'
Fixes: 636/clusterfuzz-testcase-6520876646268928
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/gsmdec_template.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/gsmdec_template.c b/libavcodec/gsmdec_template.c index 9b3c0e9719..4e40a20106 100644 --- a/libavcodec/gsmdec_template.c +++ b/libavcodec/gsmdec_template.c @@ -41,7 +41,7 @@ static void apcm_dequant_add(GetBitContext *gb, int16_t *dst, const int *frame_b static inline int gsm_mult(int a, int b) { - return (a * b + (1 << 14)) >> 15; + return (int)(a * (SUINT)b + (1 << 14)) >> 15; } static void long_term_synth(int16_t *dst, int lag, int gain_idx) |