1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-03-17 20:17:55 +02:00

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>
(cherry picked from commit 33624f4f2e1feb08f277126e637d4a28016eb07a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2020-10-08 20:44:23 +02:00
parent 58bd3eabfc
commit 71a6b3fdd0

View File

@ -395,6 +395,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) {