Skip to content

Commit 78f807b

Browse files
authored
Merge pull request #350 from abhinavagarwal07/fix-statfs-div-by-zero
fix statfs divide-by-zero when blksize is 0
2 parents fd885f0 + 82285f9 commit 78f807b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sshfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3387,7 +3387,7 @@ static int sshfs_statfs(const char *path, struct statvfs *buf)
33873387
return sshfs_ext_statvfs(path, buf);
33883388

33893389
buf->f_namemax = 255;
3390-
buf->f_bsize = sshfs.blksize;
3390+
buf->f_bsize = sshfs.blksize ? sshfs.blksize : 4096;
33913391
/*
33923392
* df seems to use f_bsize instead of f_frsize, so make them
33933393
* the same

0 commit comments

Comments
 (0)