hle: validate null out pointers before allocating in dstorage and xgamesave #3154

Open
github-bot wants to merge 1 commit from github-bot/gh-3154 into main AGit
Owner

@⁠RanoGames on GitHub · 2026-11-29 20:20 UTC · original
RanoGames:fix/hle-null-out-leaks → main · +63 −0 · 2 files · 1 commits · open

What it changes

  • Adds early out.is_null() checks returning E_INVALIDARG before allocating heap objects, Win32 events, or scheduler lanes in dstorage::create_status_array, dstorage::new_queue, xgamesave::create_container, and xgamesave::create_update.
  • Adds unit tests (null_out_returns_invalidarg_without_leaking) in both dstorage::tests and xgamesave::tests.

How it was tested

  • cargo test --locked -p victory-hle --lib -- modules::dstorage::tests modules::xgamesave::tests (46 passed, 0 failed, 2 ignored benchmarks).
  • cargo xtask policy --staged (asset policy: 2 files ok).

Checked for overlap

  • Searched open and closed PRs on trustno1-coder/VIctory-NVIDIA for create_status_array, new_queue, create_container, create_update, E_INVALIDARG dstorage, and E_INVALIDARG xgamesave; no existing PR addresses these null-out leaks.
**@⁠RanoGames** on GitHub · 2026-11-29 20:20 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3154) `RanoGames:fix/hle-null-out-leaks` → `main` · +63 −0 · 2 files · 1 commits · open ## What it changes - Adds early `out.is_null()` checks returning `E_INVALIDARG` before allocating heap objects, Win32 events, or scheduler lanes in `dstorage::create_status_array`, `dstorage::new_queue`, `xgamesave::create_container`, and `xgamesave::create_update`. - Adds unit tests (`null_out_returns_invalidarg_without_leaking`) in both `dstorage::tests` and `xgamesave::tests`. ## How it was tested - `cargo test --locked -p victory-hle --lib -- modules::dstorage::tests modules::xgamesave::tests` (46 passed, 0 failed, 2 ignored benchmarks). - `cargo xtask policy --staged` (`asset policy: 2 files ok`). ## Checked for overlap - Searched open and closed PRs on `trustno1-coder/VIctory-NVIDIA` for `create_status_array`, `new_queue`, `create_container`, `create_update`, `E_INVALIDARG dstorage`, and `E_INVALIDARG xgamesave`; no existing PR addresses these null-out leaks.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 20:23:53 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3154/head:github-bot/gh-3154'
git switch 'github-bot/gh-3154'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3154'
git switch 'github-bot/gh-3154'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3154'
git switch 'github-bot/gh-3154'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3154'
git switch 'main'
git merge --squash 'github-bot/gh-3154'
git switch 'main'
git merge --ff-only 'github-bot/gh-3154'
git switch 'main'
git merge 'github-bot/gh-3154'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!3154
No description provided.