Repository navigation
Conversation
ossilator
reviewed
Sep 30, 2026
tuffnatty
force-pushed
the
sftpfs-uninitialized-stat
branch
from
October 3, 2026 15:20
b13bb10 to
674de79
Compare
copy_file_file() uses the st_blksize member of struct stat for buffer size calculation. Uninitialized value results in a memory allocation error. This change always zero-initializes the struct, so one non-zero initialization of st_nlink needs to be moved after a call that now clears the struct. Signed-off-by: Phil Krylov <phil@krylov.eu>
tuffnatty
force-pushed
the
sftpfs-uninitialized-stat
branch
from
October 4, 2026 11:26
674de79 to
fb1b0b9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
copy_file_file() uses the st_blksize member of struct stat for buffer size calculation. Uninitialized value results in a memory allocation error.
Proposed changes
Always zero-initialize sftpfs-generated
struct stat. Always fillst_blksizein.Checklist
git commit --amend -smake indent && make check)