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:
+3
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user