avcodec/cinepak: Check available input against encoded buffer size
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 12 May 2019 20:06:30 +0000 (22:06 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 14 May 2019 10:06:26 +0000 (12:06 +0200)
commit87a54e150e9cb6479e590faaf66d9f405a97fb6c
treee2de127a614e2cea75ef282c0230713b63d9faa0
parent8b2140de6314f9ea9ebbaf6a127cca35306d8a67
avcodec/cinepak: Check available input against encoded buffer size

Fixes: Timeout (12sec -> 2sec)
Fixes: 14606/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CINEPAK_fuzzer-5738687561728000

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/cinepak.c