fix: проверка ftell на возвращаемое значение

This commit is contained in:
Artyom Gavrilov
2025-02-05 23:22:24 +03:00
parent 5f20220d4e
commit ad6b84a961

View File

@@ -68,6 +68,10 @@ static int read_file(const char* filename) {
}
long fsize = ftell(fd);
if (fsize == -1L) {
ret = -errno;
goto close_file;
}
fseek(fd, 0, SEEK_SET);
if (ret < 0) {
ret = -errno;