avcodec/cinepak: move some checks prior to frame allocation
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 17 Apr 2018 00:13:42 +0000 (02:13 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 9 Jul 2018 23:52:55 +0000 (01:52 +0200)
commit173e04ee85a8de7475eecb486e27adefc01847d3
tree796ac1ee518394611278a98910a925c0fb193e33
parente5b29c60f02fa03a69b047ebc5d35737dd77ed1d
avcodec/cinepak: move some checks prior to frame allocation

Speeds up decoding from 8 to 3 seconds for 6302/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CINEPAK_fuzzer-5626371985375232
Fixes: Timeout

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 2324ef1ff32e5effd6f295bca80580ae4816be0b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/cinepak.c