avcodec/ilbcdec: fix integer overflow in energy
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 9 Dec 2018 01:26:18 +0000 (02:26 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 21 Jan 2019 06:53:26 +0000 (07:53 +0100)
commit5550946ff4bdb4f6092e6aabd8d11888695ffbd0
treec843da59318685c956fa9319f94d38911ddbfd24
parentdaef9d43828733534267dd15975f761ce7277a5b
avcodec/ilbcdec: fix integer overflow in energy

webrtc uses a int32_t like the existing code in ilbcdec

Fixes: signed integer overflow: 2080245063 + 257939661 cannot be represented in type 'int'
Fixes: 11037/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ILBC_fuzzer-5682976612941824

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 fbf409cd91aca2b4738c6b5bc963ae6041f26701)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/ilbcdec.c