avcodec/alsdec: Fix integer overflows of raw_samples in decode_var_block_data()
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 26 Jul 2019 13:37:30 +0000 (15:37 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 11 Aug 2019 17:13:21 +0000 (19:13 +0200)
commitfad3ec89b7a664b93b5e29bdb0db0cab0272a0c4
tree7f60651d884d8112e4052856f86349530e216e1a
parentce652324062a2c72f92e40699797630ef7f1ec5a
avcodec/alsdec: Fix integer overflows of raw_samples in decode_var_block_data()

This also makes the code consistent with the existing similar MUL64()
in decode_var_block_data()

Fixes: signed integer overflow: -7277630735906765035 + -3272193951413647896 cannot be represented in type 'long'
Fixes: 16015/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5666552818434048

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/alsdec.c