diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-11-02 15:15:46 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-06 11:30:44 +0100 |
commit | 4edd992a65ae6621db396497e84d0a13d7dfe685 (patch) | |
tree | c7989322c5bef7758daf510eb60a528bc9b35e2d | |
parent | 5574daa6905331125b241f7c9532ea3a43d6420f (diff) | |
download | ffmpeg-4edd992a65ae6621db396497e84d0a13d7dfe685.tar.gz |
avcodec/wmavoice: Fix integer overflow in synth_frame()
Fixes: left shift of negative value -3
Fixes: 18518/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAVOICE_fuzzer-6560514359951360
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 cf323f4d38f5756ecdb8fb4f72c80a8069da832e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/wmavoice.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c index 44cfc3bc61..bb7950be47 100644 --- a/libavcodec/wmavoice.c +++ b/libavcodec/wmavoice.c @@ -1523,7 +1523,7 @@ static int synth_frame(AVCodecContext *ctx, GetBitContext *gb, int frame_idx, /* "pitch-diff-per-sample" for calculation of pitch per sample */ s->pitch_diff_sh16 = - ((cur_pitch_val - s->last_pitch_val) << 16) / MAX_FRAMESIZE; + (cur_pitch_val - s->last_pitch_val) * (1 << 16) / MAX_FRAMESIZE; } /* Global gain (if silence) and pitch-adaptive window coordinates */ |