Merge pull request #350 from abhinavagarwal07/fix-statfs-div-by-zero

fix statfs divide-by-zero when blksize is 0
This commit is contained in:
h4sh
2026-05-18 12:38:39 +10:00
committed by GitHub
+1 -1
View File
@@ -3387,7 +3387,7 @@ static int sshfs_statfs(const char *path, struct statvfs *buf)
return sshfs_ext_statvfs(path, buf);
buf->f_namemax = 255;
buf->f_bsize = sshfs.blksize;
buf->f_bsize = sshfs.blksize ? sshfs.blksize : 4096;
/*
* df seems to use f_bsize instead of f_frsize, so make them
* the same