DirectStorage: clear out pointers on failure #84
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!84
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-84"
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?
@davutsimsekk on GitHub · 2026-11-24 21:22 UTC · original
davutsimsekk:fix/dstorage-factory-null-out→main· +62 −0 · 1 files · 1 commits · openDirectStorage's_COM_Outptr_methods left*ppvuntouched on failure:DStorageGetFactoryfor an unknown IID or a null IIDOpenFilefor a null path or a path that cannot be openedCreateQueuefor a null description or when the scheduler cannot be createdCreateStatusArraydid not validate the out pointer before allocatingA title that inspects
*ppvafter a failed call sees a stale pointer; the file and queue paths could also leak the object they created whenputrejected a null out pointer.This validates and clears
*ppvbefore any work, and leaves the success paths unchanged.Test
a_refused_factory_interface_clears_the_out_pointeranda_failed_file_or_queue_creation_clears_the_out_pointeruse a stale0x1234pointer and assert it is null after each failure; the second checks a null path and a null queue description. Onmainboth remain stale.cargo test -p victory-hle --lib: 98 passed, 0 failedcargo clippy -p victory-hle --all-targets --locked -- -D warnings: cleanView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.