aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/ifv.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-07-18 01:00:11 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-07-19 01:23:23 +0200
commit00ed04d6149691a9abf486b2f88172fd6341d801 (patch)
treee758a7f5c970ad0970c043deb7211c2bad75f127 /libavformat/ifv.c
parent9869e217764f180c88b66cf6d2ffee2bc5e9f6a6 (diff)
downloadffmpeg-00ed04d6149691a9abf486b2f88172fd6341d801.tar.gz
avformat/ifv: Check for EOF in read_index()
Fixes: Timeout Fixes: 15567/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5758451487080448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/ifv.c')
-rw-r--r--libavformat/ifv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/ifv.c b/libavformat/ifv.c
index 6acbb29a75..f95e9b0e52 100644
--- a/libavformat/ifv.c
+++ b/libavformat/ifv.c
@@ -68,6 +68,8 @@ static int read_index(AVFormatContext *s,
}
for (i = start_index; i < end_index; i++) {
+ if (avio_feof(s->pb))
+ return AVERROR_EOF;
pos = avio_rl32(s->pb);
size = avio_rl32(s->pb);