RPC: UuidFromString takes only the dashed GUID form, braces paired (junk after } was accepted) #261
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!261
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-261"
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?
@sharan104 on GitHub · 2026-11-26 13:33 UTC · original
sharan104:fix/kernel-audit→main· +40 −9 · 1 files · 1 commits · openrpcrt4.rsparse(), whichUuidFromStringA/Wuse, skipped dashes wherever they stood, and returned as soon as a}followed the 32nd digit. So malformed text returnedRPC_S_OKwhere the runtime returnsRPC_S_INVALID_STRING_UUID:…abcde}junk{…or…}{{…}The function's own comment ("the dashes in place") and the existing
garbage_is_refusedtest show this text was meant to be refused.Fix: the text must be exactly
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, optionally inside one pair of braces. Braces stay accepted, as the code and its test deliberately allow.parsehas no other callers.Test:
malformed_guid_text_is_refusedcovers 9 malformed strings. It fails before the change and passes after it (10 runs out of 10). The existing valid-GUID tests (upper case, braces,AandW) still pass.Results:
cargo test -p victory-hle --locked: 156 passed, 2 ignored.cargo clippy -p victory-hle --all-targets --locked --no-deps -- -D warningsis clean, with and without--all-features.🤖 Generated with Claude Code
The parser skipped dashes wherever they stood and returned as soon as a closing brace followed the 32nd digit. So text with junk after the brace ("...abcde}junk"), a brace without its pair, or dashes missing or out of place parsed as a GUID and UuidFromStringA/W returned RPC_S_OK, where the runtime returns RPC_S_INVALID_STRING_UUID. A title that checks a string with UuidFromString took malformed text as valid. The text is now exactly xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, optionally inside one pair of braces, as the parser's comment already said. The new test malformed_guid_text_is_refused fails before this change and passes after it. Co-Authored-By: Claude Opus 5.5 <[email protected]>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.