aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-01-12 21:54:31 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-01-29 19:36:46 +0100
commit9725d07a1770fbfafe5f7b3f7d95a2a513308538 (patch)
tree3e7c38812ec4f6f959ef563c17bf6801d6997038
parent06e5c791949b63555aa4305df6ce9d2ffa45ec90 (diff)
downloadffmpeg-9725d07a1770fbfafe5f7b3f7d95a2a513308538.tar.gz
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>
-rw-r--r--libavformat/flvdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index c1f02125bc..943c0278e5 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -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);