Skip to content

Fix size calculations in the WinFSP symlink reparse buffer#233

Open
tomgr wants to merge 1 commit into
buildbarn:mainfrom
tomgr:winfsp-symlink-reparse
Open

Fix size calculations in the WinFSP symlink reparse buffer#233
tomgr wants to merge 1 commit into
buildbarn:mainfrom
tomgr:winfsp-symlink-reparse

Conversation

@tomgr

@tomgr tomgr commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

FillSymlinkReparseBuffer derived the reparse data length from sizeof(SymbolicLinkReparseBuffer), which rounds the struct up for its uint32 Flags field and so carried 2 bytes of superfluous padding.

The PathBuffer slice was also built with a length in bytes where uint16 elements were required, making it twice as long as the backing storage.

Neither appears to cause a problem in practice but probably good to clean up.

FillSymlinkReparseBuffer derived the reparse data length from
sizeof(SymbolicLinkReparseBuffer), which rounds the struct up for its
uint32 Flags field and so carried 2 bytes of superfluous padding.

The PathBuffer slice was also built with a length in bytes where uint16
elements were required, making it twice as long as the backing storage.

Neither appears to cause a problem in practice but probably good to
clean up.
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