XGameSave: reject empty container name in XGameSaveDeleteContainer #95
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!95
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/95/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?
@raylitebull on GitHub · 2026-11-23 11:07 UTC · original
raylitebull:fix/gamesave-empty-container-delete→main· +48 −0 · 1 files · 1 commits · closed without mergingSummary
Fixes a data-loss bug in
XGameSaveDeleteContainer/XGameSaveDeleteContainerAsync(crates/xcl/src/hle/xgameruntime/gamesave.rs):XGameSaveCreateContainer,XGameSaveDeleteContainerdid not validate that the container name is non-empty (or within the 256-byte limit).""causedenc("") == "", sostd::fs::remove_dir_all(pr.root.join(""))deleted the entire provider root directory and wiped every save container under it while returningS_OK.XGameSaveDeleteContainernow rejectsn.is_empty() || n.len() > 256withE_GS_INVALID_CONTAINER_NAME, matchingXGameSaveCreateContainer.Testing
delete_container_rejects_empty_name_without_wiping_provider_rootincrates/xcl/src/hle/xgameruntime/gamesave.rs:origin/main):XGameSaveDeleteContainer(provider, "")returnedS_OKand deleted existing containers and the provider root directory.E_GS_INVALID_CONTAINER_NAMEfor both syncXGameSaveDeleteContainerand asyncXGameSaveDeleteContainerAsync, leaving existing containers and blobs intact.origin/main(60599a9):cargo build --workspaceandcargo test --workspace -- --test-threads=4pass with 0 failures and 0 new warnings.@raylitebull on GitHub · 2026-11-23 11:22 UTC · original
Closing in favor of #108, which supersedes this fix — it includes the same
!name.is_empty() && name.len() <= 256(E_GS_INVALID_CONTAINER_NAME) validation for bothXGameSaveDeleteContainerandXGameSaveDeleteContainerAsync, plus defers async container deletion until work dispatch and serializes deletion withapply().@ivall on GitHub · 2026-11-23 11:25 UTC · original
Merged together with #95–#102 and checked on Windows 11 with an RX 9070:
cargo test --workspacegreen with the retail samples (shader pack, console DLLs, texture archive), lib tests also withXCL_SPLIT_WAVE64=1; XDefiant (title screen, a scripted A reaches its "Xbox network unavailable" dialog), Unicorn Overlord and Minecraft run. Thanks!Pull request closed