avformat/asfdec_o: Check for EOF in asf_read_marker()

Fixes: Timeout
Fixes: 26460/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_O_fuzzer-5710884393189376

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/371/head
Michael Niedermayer 4 years ago
parent b897b52618
commit 9e3d09f435
  1. 3
      libavformat/asfdec_o.c

@ -245,6 +245,9 @@ static int asf_read_marker(AVFormatContext *s, const GUIDParseTable *g)
avio_skip(pb, 4); // flags
len = avio_rl32(pb);
if (avio_feof(pb))
return AVERROR_INVALIDDATA;
if ((ret = avio_get_str16le(pb, len, name,
sizeof(name))) < len)
avio_skip(pb, len - ret);

Loading…
Cancel
Save