mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-28 10:04:37 +08:00
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:
1 file changed
+3
-1
+3
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user