avcodec/qdm2: error out of qdm2_fft_decode_tones() before entering endless loop
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 23 Jun 2019 23:01:03 +0000 (01:01 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 8 Jul 2019 09:46:09 +0000 (11:46 +0200)
commit07975e89d32642e588d7713feed5a949e976e50e
treec0f6a12e7a1f32ed6c2c7971be1206d542ae954b
parente5c21ed6e35e1efc89b583c793fd64b8b53f93e3
avcodec/qdm2: error out of qdm2_fft_decode_tones() before entering endless loop

Fixes: signed integer overflow: 2147483646 + 2 cannot be represented in type 'int'
Fixes: infinite loop
Fixes: 15396/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDM2_fuzzer-5116605501014016

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