avcodec/qdm2: Move fft_order check up
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 17 Jun 2019 18:58:47 +0000 (20:58 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 29 Jun 2019 18:42:20 +0000 (20:42 +0200)
commit423d0bbc556721849847d6dc9143d41d97b9a03c
tree324d609f9942be3663e347bf92bb84a5b59bbf81
parent1aa0c2a06f005cac6e2f310f368a38af91682c62
avcodec/qdm2: Move fft_order check up

This avoids undefined computations with unchecked values

Fixes: shift exponent -21 is negative
Fixes: 15262/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDM2_fuzzer-5651261753393152

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