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>
(cherry picked from commit 927ae7a0d5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer committed 2026-05-04 15:57:14 +02:00
1 parent 7b0d7f2355
commit 3db144ada7
1 file changed
+3 -1
+3 -1
View File
@@ -297,7 +297,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);
}