Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-06-20 02:36:29 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-07-22 18:15:53 +0300
commit5dfad587a179bda099d8aeb711fa73db4908b2ac (patch)
tree1146eaa46d5864519c77cbedf09892cdf1fb41cb
parent932463c69dc9263a4fdec03f99429ae9885d9a4f (diff)
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> (cherry picked from commit ceff5d7b74cd9ae6055957979d27d289c70a9e1b) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/flvdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 7c8d83edf1..8c81e0b98e 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -434,6 +434,8 @@ static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, int64_t m
goto invalid;
if (current_array == &times && (d <= INT64_MIN / 1000 || d >= INT64_MAX / 1000))
goto invalid;
+ if (avio_feof(ioc))
+ goto invalid;
current_array[0][i] = d;
}
if (times && filepositions) {