Commit cf323f4d authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 5634e205
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment