Skip to content

fix statfs divide-by-zero when blksize is 0#350

Merged
h4sh5 merged 1 commit into
libfuse:masterfrom
abhinavagarwal07:fix-statfs-div-by-zero
May 18, 2026
Merged

fix statfs divide-by-zero when blksize is 0#350
h4sh5 merged 1 commit into
libfuse:masterfrom
abhinavagarwal07:fix-statfs-div-by-zero

Conversation

@abhinavagarwal07
Copy link
Copy Markdown
Collaborator

On macOS, sshfs.blksize is set to 0. The statfs fallback path (used when the server lacks the statvfs extension) divides by f_frsize, which inherits that zero.

Use 4096 as the default when blksize is unset.

No test: this needs macOS blksize=0 plus a server without statvfs, which CI does not cover.

On macOS, sshfs.blksize is set to 0. The statfs fallback path
(used when the server lacks the statvfs extension) divides by
f_frsize, which inherits that zero. Use 4096 as the default.
@h4sh5 h4sh5 merged commit 78f807b into libfuse:master May 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants