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 17:22:19 +0000 (19:22 +0200)
commit8d8b8c4ac6fb5b5d40bd131f2d2ea9d85b8759a6
tree5edc37d1e5af9f259d71398ac3575517c143b9a0
parentcf3c245566e8a8d45ed2ad9fdff9ef50327ba2d3
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>
libavcodec/qdm2.c