avformat/dhav: Check avio_seek() return

Fixes: infinite loop
Fixes: 472567148/clusterfuzz-testcase-minimized-ffmpeg_dem_DHAV_fuzzer-4520943574908928

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
2026-02-10 17:44:52 +01:00
parent b2f1657087
commit 927ae7a0d5
+3 -1
View File
@@ -321,7 +321,9 @@ static int dhav_read_header(AVFormatContext *s)
if (seek_back < 9)
break;
dhav->last_good_pos = avio_tell(s->pb);
avio_seek(s->pb, -seek_back, SEEK_CUR);
int64_t ret64 = avio_seek(s->pb, -seek_back, SEEK_CUR);
if (ret64 < 0)
return ret64;
}
avio_seek(s->pb, dhav->last_good_pos, SEEK_SET);
}