Repository navigation
HLE: a '>' in a quoted manifest attribute does not end its tag - #359
Merged
Marvisak merged 1 commit intoNov 25, 2026
Merged
Conversation
The MicrosoftGame.config reader ended a tag at its first '>', but XML allows '>' unescaped inside an attribute value. A value with one (DefaultDisplayName="A > B") cut the tag short: its '/>' was never seen, so the element stayed open and every element after it was read as its child. Game/TitleId and the storage quota were then not found, and the title ran as id 00000000 with no storage quota, its saves and temporary files in that folder, without a warning. A tag now ends at the first '>' outside quotes.
muhammed-aksoy
pushed a commit
to muhammed-aksoy/VIctory
that referenced
this pull request
Nov 24, 2026
edsuuu
referenced
this pull request
in edsuuu/VI-BR-PORT
Nov 24, 2026
… its tag Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Tested PR #359 at head
Behavior covered: Checks quoted angle brackets do not terminate manifest tags and title/store/quota fields still parse. |
Closed
mercuryVM
approved these changes
Nov 24, 2026
mercuryVM
left a comment
There was a problem hiding this comment.
Tested d549b63 on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (265 passed, 0 failed).
- XML 1.0 allows a raw
>in an attribute value, so the oldfind('>')was wrong for any manifest with one.tag_endtracks"and'and only ends the tag on an unquoted>. - I checked the cases that could regress:
- Comments and CDATA are still split off before
tag_end(the<!--and<![CDATA[arms), so an apostrophe in a comment can't start a "quote". <?xml version="1.0"?>and similar declarations have balanced quotes.- Element text isn't scanned by
tag_endat all.
- Comments and CDATA are still split off before
No issues found.
AI-assisted (Claude Code).
mercuryVM
added a commit
to mercuryVM/VIctory
that referenced
this pull request
Nov 24, 2026
…bute does not end its tag Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 24, 2026
This was referenced Nov 24, 2026
github-actions Bot
added a commit
to KevinPratap/VIctory
that referenced
this pull request
Nov 24, 2026
github-actions Bot
added a commit
to KevinPratap/VIctory
that referenced
this pull request
Nov 24, 2026
github-actions Bot
added a commit
to KevinPratap/VIctory
that referenced
this pull request
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's wrong
runtime::elementsreadsMicrosoftGame.configto get the title id (Game/TitleId) and the storage quota (Game/PersistentLocalStorage/SizeMB). It ends every tag at the tag's first>.XML allows
>unescaped inside an attribute value (XML 1.0 §3.1:AttValue ::= '"' ([^<&"] | Reference)* '"'). So a manifest with, say:has its
ShellVisualstag cut short atA. The/>that closes the element is never seen, the element stays open, and every element after it is read as its child (Game/ShellVisuals/TitleId).Title::from_manifestthen finds no title id and no quota.run.rsgoes on with title id00000000and a 0-byte storage quota: the title's storage, saves and temporary files go underdata/00000000/, with no warning. Only thetitle 00000000line in the console hints at it.What the fix does
A new helper,
tag_end, ends a tag at the first>that is outside a"…"or'…'attribute value. Comments and CDATA sections are handled as before.How it behaves after the fix
Manifests whose attribute values contain
>give their real title id and storage quota. Manifests without one are read exactly as before.Tests
a_quoted_angle_bracket_does_not_end_its_taghas a>in a double-quoted and in a single-quoted attribute value beforeTitleId. It expects(0x639AA8DD, 64 MiB).I ran
cargo test --workspaceon GitHub'swindows-latestwith Rust 1.98.1 fromrust-toolchain.toml:victory-hlehas 87 passed, the other crates have 0 failed.main: it fails with title id and quota(0, 0)instead of(0x639AA8DD, 64 MiB).--test-threads=1. With 4 threads, the shader crate's GPU tests sometimes crash on that runner (Tests: victory-shader tests crash (0xC0000005) when several tests use WARP devices in parallel #181, Shaders: share and serialize WARP host operations across threads #244).Not tested: a real title's manifest with such a value.
Related: #112 and #337 also edit this file, a few lines further down. Neither conflicts with this change.