Reject embedded NUL bytes in direct drive lookups #27
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/JamesCicada--GTAVI-Recomp!27
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-27"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@RavenCurseBurg on GitHub · 2026-11-26 04:32 UTC · original
RavenCurseBurg:fix/drive-lookup-nul→main· +17 −1 · 3 files · 1 commits · openDriveMap::drive_for()accepts astd::string_view. For the full view"/mnt/d/data\0suffix"sv, it previously returned driveD, although translating the same path withposix_to_windows()returnedErrorCode::PathInvalid.The direct lookup now checks for embedded NUL bytes before matching a mount. The public header documents that behavior. A regression test sends the same view, including the bytes after the NUL, to both entry points.
I ran the regression against the parent commit and confirmed that the direct lookup returned success. With the patch, all three native CTest targets pass in a Windows Release build with GCC 15.2 and warnings promoted to errors.
AI-assisted with Codex + GPT-6.2 Astra (xhigh).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.