Browse Source

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 33624f4f2e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.3.2
Michael Niedermayer 5 years ago
parent
commit
9b6d73a9ae
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/flvdec.c

+ 2
- 0
libavformat/flvdec.c View File

@@ -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) {


Loading…
Cancel
Save