diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-09-20 21:09:31 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-09-21 11:55:35 +0200 |
commit | 7170d342e597a39f48d1bedb3a2382f25a324155 (patch) | |
tree | a4942b7ccf200ec9d67082267539518ab2576a69 /libavformat/vividas.c | |
parent | 688c1175ba91d0477cc461e5bfda210d6659a3b8 (diff) |
avformat/vividas: Check for EOF in first loop in track_header()
Fixes: timeout (243sec -> a few ms)
Fixes: 25716/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5764093666131968
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/vividas.c')
-rw-r--r-- | libavformat/vividas.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/vividas.c b/libavformat/vividas.c index 36c007b0d2..7917df5d64 100644 --- a/libavformat/vividas.c +++ b/libavformat/vividas.c @@ -293,6 +293,8 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t * for (i=0;i<val_1;i++) { int c = avio_r8(pb); + if (avio_feof(pb)) + return AVERROR_EOF; for (j=0;j<c;j++) { if (avio_feof(pb)) return AVERROR_EOF; |