Skip to content

Conversation

@SiliconA-Z
Copy link
Contributor

No description provided.

@SiliconA-Z SiliconA-Z requested a review from a team as a code owner December 27, 2025 03:52
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Dec 27, 2025
@StephanTLavavej
Copy link
Member

This certainly appears to be a bug, after looking into how FSCTL_GET_REPARSE_POINT and FSCTL_SET_REPARSE_POINT work. This codepath is used in a single place, when copying a junction. I'll need to manually exercise this scenario (automated test coverage could potentially be problematic).

@StephanTLavavej StephanTLavavej added bug Something isn't working filesystem C++17 filesystem labels Dec 31, 2025
@StephanTLavavej StephanTLavavej changed the title Bug: We should use the size of the buffer, not buffer pointer filesystem.cpp: __std_fs_write_reparse_data_buffer() should use the size of the buffer, not buffer pointer Dec 31, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Work In Progress in STL Code Reviews Jan 5, 2026
@StephanTLavavej
Copy link
Member

We don't think this fix is correct, sizeof(*_Buffer) contains a "fake" array element.

@Morddin
Copy link

Morddin commented Jan 16, 2026

After a quick search on the internet, it seems that sizeof(_Buffer) should be replaced with REPARSE_DATA_BUFFER_HEADER_SIZE.

REPARSE_DATA_BUFFER_HEADER_SIZE is defined in the Windows Driver Kit as:

#define REPARSE_DATA_BUFFER_HEADER_SIZE   UFIELD_OFFSET(REPARSE_DATA_BUFFER, GenericReparseBuffer)

Its value is 8.

@StephanTLavavej
Copy link
Member

Superseded by #6064, thanks everyone.

@github-project-automation github-project-automation bot moved this from Work In Progress to Done in STL Code Reviews Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working filesystem C++17 filesystem

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants