HLE: enforce XSystemXboxLiveSandboxId minimum buffer size (fixes #862) #972
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!972
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/972/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?
@pushkarreddyy on GitHub · 2026-11-24 14:36 UTC · original
pushkarreddyy:fix/hle-sandbox-id-buffer-minimum→main· +29 −0 · 1 files · 2 commits · closed without mergingSummary
Enforces
XSystemXboxLiveSandboxIdMaxBytes(16 bytes) onsandbox_id, resolving #862.Changes
crates/victory-hle/src/modules/xsystem.rs:const SANDBOX_ID_MAX_BYTES: usize = 16;matching GDKXSystem.h.sandbox_id, checkedif size < SANDBOX_ID_MAX_BYTES { return super::xasync::E_NOT_SUFFICIENT_BUFFER; }prior to delegating toput_string.a_sandbox_id_buffer_under_the_documented_minimum_is_refusedverifying buffer sizes 0, 7, and 15 returnE_NOT_SUFFICIENT_BUFFER(0x8007007A) leaving the buffer andusedcount untouched, while size 16 succeeds (S_OK) with"RETAIL\0"andused = 7.Verification
cargo test -p victory-hle.@Zipettte on GitHub · 2026-11-24 15:13 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
d3633c5:cargo test -p victory-hledoes not compile:The line is added by this PR;
crate::modules::xasync::E_NOT_SUFFICIENT_BUFFERshould work. main (ffe310e) builds and passes on the same machine.Tested with AI assistance (Claude).
@pushkarreddyy on GitHub · 2026-11-24 15:28 UTC · original
Thanks @Zipettte for the sharp catch and test run!
Pushed commit
886a867importingE_NOT_SUFFICIENT_BUFFERviacrate::modules::xasyncsomod testsresolves the symbol cleanly.@Marvisak on GitHub · 2026-11-25 00:28 UTC · original
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #939.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed