Commit faea5b44 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/vividas: Add EOF check in val_1 loop in track_header()

Fixes: Timeout (148sec -> 0.1sec)
Fixes: 18427/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5682124627116032

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 19b8db29
......@@ -295,6 +295,8 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t *
for (i=0;i<val_1;i++) {
int c = avio_r8(pb);
for (j=0;j<c;j++) {
if (avio_feof(pb))
return AVERROR_EOF;
avio_r8(pb); // val_3
avio_r8(pb); // val_4
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment