avcodec/agm: Check that there is available input in read_code()
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 2 Apr 2019 18:27:13 +0000 (20:27 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 24 Apr 2019 15:05:02 +0000 (17:05 +0200)
commitcaa9b4ff89c00591a0730d2cc5db8693da8dffba
tree612adc072f530afc409a4120d99868a8607de908
parentd0ca749adbf266f3bd9028f4d50530ecfe30a5a8
avcodec/agm: Check that there is available input in read_code()

Fixes: Timeout (46sec -> 7ms)
Fixes: 14030/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5721258760601600

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