Guard against null output buffer in xg::tiling #461

Closed
github-bot wants to merge 660 commits from github-bot/gh-461 into main AGit
Owner

@⁠ahmetbagci8 on GitHub · 2026-11-29 20:51 UTC · original
ahmetbagci8:fix/hle-xg-tiling-null-out → main · +60031 −5431 · 207 files · 660 commits · closed without merging

Problem

In crates/victory-hle/src/modules/xg.rs, iling() writes SubresourceTiling entries through out.add(i as usize).write(entry) whenever count is non-null and *count > 0, without checking whether out is null. Passing a null out buffer to query the subresource tiling count immediately dereferences null.

Fix

Skip writing entries when out.is_null() and report the available subresource tiling count in *n instead. Extended layout_and_copies_through_the_object to verify querying with out = null alongside the existing non-null check.

Verification

  • cargo test -p victory-hle --lib xg::tests (4 passed, 0 failed)
  • cargo clippy -p victory-hle --tests (0 warnings)
**@⁠ahmetbagci8** on GitHub · 2026-11-29 20:51 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/461) `ahmetbagci8:fix/hle-xg-tiling-null-out` → `main` · +60031 −5431 · 207 files · 660 commits · closed without merging ## Problem In crates/victory-hle/src/modules/xg.rs, iling() writes SubresourceTiling entries through out.add(i as usize).write(entry) whenever count is non-null and *count > 0, without checking whether out is null. Passing a null out buffer to query the subresource tiling count immediately dereferences null. ## Fix Skip writing entries when out.is_null() and report the available subresource tiling count in *n instead. Extended layout_and_copies_through_the_object to verify querying with out = null alongside the existing non-null check. ## Verification - cargo test -p victory-hle --lib xg::tests (4 passed, 0 failed) - cargo clippy -p victory-hle --tests (0 warnings)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 20:51:46 +00:00
github-bot closed this pull request 2026-11-30 17:08:26 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-30 17:05 UTC · original

main has moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the current main and open a new PR; I'll review it there.

**@⁠TaynanGT** on GitHub · 2026-11-30 17:05 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/461#issuecomment-7285696818) `main` has moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the current `main` and open a new PR; I'll review it there.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.