diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-10-08 20:44:23 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-10-17 14:36:11 +0200 |
commit | 33624f4f2e1feb08f277126e637d4a28016eb07a (patch) | |
tree | f97c903fa019fd20ecc65f7090be1026768e93b6 /libavformat/flvdec.c | |
parent | 77cdc684792e6ce0b95a5308d7b61a6906fb5d15 (diff) |
avformat/flvdec: Check for EOF in amf_parse_object()
Fixes: Timeout (too long -> 1ms)
Fixes: 26108/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5653887668977664
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r-- | libavformat/flvdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index d480d0bc67..ac9f9c77db 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -495,6 +495,8 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, num_val = 0; ioc = s->pb; + if (avio_feof(ioc)) + return AVERROR_EOF; amf_type = avio_r8(ioc); switch (amf_type) { |