avcodec/wavarc: fix integer overflow in decode_5elp() block type 2

Fixes: signed integer overflow: 2097152000 + 107142979 cannot be represented in type 'int'
Fixes: 67919/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-5955101769400320

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 a2ec2bd493)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/6.1
Michael Niedermayer 8 months ago
parent 6ed54900f7
commit 5017839ca0
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 2
      libavcodec/wavarc.c

@ -690,7 +690,7 @@ static int decode_5elp(AVCodecContext *avctx,
for (int o = 0; o < order; o++)
sum += s->filter[ch][o] * (unsigned)samples[n + 70 - o - 1];
samples[n + 70] += ac_out[n] + (sum >> 4);
samples[n + 70] += ac_out[n] + (unsigned)(sum >> 4);
}
for (int n = 0; n < 70; n++)

Loading…
Cancel
Save