avcodec/cfhd: Move peak_table() and difference_coding() calls after the existing...
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 12 Aug 2018 22:44:48 +0000 (00:44 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 20 Aug 2018 00:32:41 +0000 (02:32 +0200)
commit2c1613ac94d07fd85e8831bb7aa7eb4bec707285
tree36ddc98203553d6af4e1fd057e5c2c690e690932
parentdbac849c4db9c9378ab6e55f4f489debf2659b04
avcodec/cfhd: Move peak_table() and difference_coding() calls after the existing coefficient count check

Fixes: out of array access
Fixes: 9509/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5283250636324864
Fixes: 9572/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-4920757409808384
Fixes: 9596/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5114917580439552
Fixes: 9640/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-6247840698335232
Fixes: 9659/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-6079554987753472

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