avcodec/eatgv: Check remaining size after the keyframe header
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 28 Jul 2019 19:09:14 +0000 (21:09 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 29 Jul 2019 20:58:43 +0000 (22:58 +0200)
commit009ec8dc3345353b1cd2316423918533fcb89552
tree9b3d896ac78474c8d388f3097a3ff770a40cdc76
parentb123d0780ec26456b08cd50e1062d464262ceb38
avcodec/eatgv: Check remaining size after the keyframe header

The minimal size which unpack() will not fail on is 5 bytes
Fixes: Timeout (14sec -> 77ms) (testcase 15508)
Fixes: 15508/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EATGV_fuzzer-5700053513011200
Fixes: 15996/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EATGV_fuzzer-5751353223151616

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