[FFmpeg-devel] [PATCH 3/4] avformat/flvdec: Check for EOF in amf_skip_tag()
Michael Niedermayer
michael at niedermayer.cc
Tue Jan 12 23:51:15 EET 2021
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 at niedermayer.cc>
---
libavformat/flvdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index ad6e7a3ca5..9e348f66b3 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -841,6 +841,9 @@ static int amf_skip_tag(AVIOContext *pb, AMFDataType type)
{
int nb = -1, ret, parse_name = 1;
+ if (avio_feof(pb))
+ return AVERROR_EOF;
+
switch (type) {
case AMF_DATA_TYPE_NUMBER:
avio_skip(pb, 8);
--
2.17.1
More information about the ffmpeg-devel
mailing list