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>
pull/388/head
Michael Niedermayer 3 years ago
parent b5de084aa6
commit ceff5d7b74
  1. 2
      libavformat/flvdec.c

@ -463,6 +463,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) {

Loading…
Cancel
Save