mirror of
https://github.com/Waujito/youtubeUnblock.git
synced 2025-12-19 14:08:43 +03:00
fix: проверка ftell на возвращаемое значение
This commit is contained in:
@@ -68,6 +68,10 @@ static int read_file(const char* filename) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
long fsize = ftell(fd);
|
long fsize = ftell(fd);
|
||||||
|
if (fsize == -1L) {
|
||||||
|
ret = -errno;
|
||||||
|
goto close_file;
|
||||||
|
}
|
||||||
fseek(fd, 0, SEEK_SET);
|
fseek(fd, 0, SEEK_SET);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
ret = -errno;
|
ret = -errno;
|
||||||
|
|||||||
Reference in New Issue
Block a user