HLE: a '>' in a quoted manifest attribute does not end its tag #359
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!359
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/359/head"
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?
@Dufftwt on GitHub · 2026-11-24 02:34 UTC · original
Dufftwt:fix/manifest-quoted-angle-bracket→main· +25 −1 · 1 files · 1 commits · merged 2026-11-25 00:10 UTCWhat'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 (#181, #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.
@jeremygold02 on GitHub · 2026-11-24 04:27 UTC · original
Tested PR #359 at head
d549b6397e3f40e77f9da670344aa15f12b26abb(state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged atd549b6397e3f40e77f9da670344aa15f12b26abb.cargo test --locked -p victory-hle a_quoted_angle_bracket_does_not_end_its_tag— passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 86 filtered out; finished in 0.00s ); cases: runtime::tests::a_quoted_angle_bracket_does_not_end_its_tag.Behavior covered: Checks quoted angle brackets do not terminate manifest tags and title/store/quota fields still parse.
Code: crates/victory-hle/src/runtime.rs