avformat/wtvdec: Check for EOF before potentially reseting the eof state

Fixes: infinite loop
Fixes: 28042/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-6311288967528448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2020-12-12 00:41:17 +01:00
parent 2c8cd4490a
commit 69754e07f5

View File

@ -953,6 +953,9 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
} else
av_log(s, AV_LOG_WARNING, "unsupported chunk:"FF_PRI_GUID"\n", FF_ARG_GUID(g));
if (avio_feof(pb))
break;
avio_skip(pb, WTV_PAD8(len) - consumed);
}
return AVERROR_EOF;