RPC: UuidFromString takes only the dashed GUID form, braces paired (junk after } was accepted) #261
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from avatarmanz/VIctory-7900XTX. Originally posted by sharan104 on 2026-11-26T13:33:33Z.
rpcrt4.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
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.