mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avformat/flvdec: Check for EOF in amf_skip_tag()
Fixes: Timeout
Fixes: 29070/clusterfuzz-testcase-minimized-ffmpeg_dem_KUX_fuzzer-5650106766458880
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 9725d07a17
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
32d3a76d93
commit
4ccca39927
@ -697,6 +697,9 @@ static int amf_skip_tag(AVIOContext *pb, AMFDataType type, int depth)
|
||||
if (depth > MAX_DEPTH)
|
||||
return AVERROR_PATCHWELCOME;
|
||||
|
||||
if (avio_feof(pb))
|
||||
return AVERROR_EOF;
|
||||
|
||||
switch (type) {
|
||||
case AMF_DATA_TYPE_NUMBER:
|
||||
avio_skip(pb, 8);
|
||||
|
Loading…
Reference in New Issue
Block a user