diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-06-20 01:36:29 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-07-21 19:28:27 +0200 |
commit | ceff5d7b74cd9ae6055957979d27d289c70a9e1b (patch) | |
tree | 9d875383fab0e57f1910df1bc5165f0c41a17915 /libavformat | |
parent | b5de084aa63b79586bc445e6a7fea837688b3941 (diff) | |
download | ffmpeg-ceff5d7b74cd9ae6055957979d27d289c70a9e1b.tar.gz |
avformat/flvdec: Check for EOF in index reading
Fixes: Timeout
Fixes: 47992/clusterfuzz-testcase-minimized-ffmpeg_dem_LIVE_FLV_fuzzer-6020443879899136
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/flvdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index c5d3c63bd0..8dba92661b 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -463,6 +463,8 @@ static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, int64_t m goto invalid; if (current_array == × && (d <= INT64_MIN / 1000 || d >= INT64_MAX / 1000)) goto invalid; + if (avio_feof(ioc)) + goto invalid; current_array[0][i] = d; } if (times && filepositions) { |