Browse Source

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>
tags/n4.4
Michael Niedermayer 5 years ago
parent
commit
9725d07a17
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/flvdec.c

+ 3
- 0
libavformat/flvdec.c View File

@@ -854,6 +854,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…
Cancel
Save