Browse Source

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>
(cherry picked from commit 7170d342e5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.3.2
Michael Niedermayer 5 years ago
parent
commit
f29a6a499a
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/vividas.c

+ 2
- 0
libavformat/vividas.c View File

@@ -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;


Loading…
Cancel
Save