HLE clears the result of blocked address lookups #1410

Merged
BaggyALPHA merged 1 commit from upstream-pr/1411 into main 2026-11-25 00:14:07 +00:00
BaggyALPHA commented 2026-11-24 17:49:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by BaggyALPHA on 2026-11-24T17:49:54Z.


Addresses item 23 (VIC-BT-023) in #1242. When the existing policy blocks a name, all four forward lookup wrappers clear the caller's result slot and return WSAHOST_NOT_FOUND. Passing a null output still returns the same error.

Native Windows Winsock clears the result for the same error across all four variants. I verified this using AI_NUMERICHOST and a nonnumeric name, so the comparison makes no DNS requests. The synthetic regression failed before the fix and now covers ANSI, Unicode, and the two extended variants. All 96 HLE tests, Clippy with all targets and features, and the asset-policy hook passed on Windows.

AI-assisted (Codex).

<!-- greyfinch-sync:Marvisak/VIctory:issue:6587987367 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1411). Originally posted by [BaggyALPHA](https://github.com/BaggyALPHA) on 2026-11-24T17:49:54Z. --- Addresses item 23 (VIC-BT-023) in #1242. When the existing policy blocks a name, all four forward lookup wrappers clear the caller's result slot and return `WSAHOST_NOT_FOUND`. Passing a null output still returns the same error. Native Windows Winsock clears the result for the same error across all four variants. I verified this using `AI_NUMERICHOST` and a nonnumeric name, so the comparison makes no DNS requests. The synthetic regression failed before the fix and now covers ANSI, Unicode, and the two extended variants. All 96 HLE tests, Clippy with all targets and features, and the asset-policy hook passed on Windows. AI-assisted (Codex).
DenRakEiw commented 2026-11-24 18:05:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T17:56:54Z.

Review: APPROVED


Tested head 2b13ae4 (fast-forward on main ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC):

  • cargo test -p victory-hle: 95 passed, 0 failed (plus no_dll_planting: 1 passed), including modules::net::tests::blocked_name_lookups_clear_the_result
  • cargo clippy -p victory-hle --all-targets: 0 warnings
  • cargo xtask policy: ok

Clean fix clearing the result pointer on blocked address lookups. Approving.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6044592635 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1411#pullrequestreview-6044592635). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-24T17:56:54Z. **Review:** APPROVED --- Tested head `2b13ae4` (fast-forward on `main` `ffe310e`) on Windows 11 x64 (Rust 1.98.1 MSVC): - `cargo test -p victory-hle`: **95 passed, 0 failed** (plus `no_dll_planting`: 1 passed), including `modules::net::tests::blocked_name_lookups_clear_the_result` - `cargo clippy -p victory-hle --all-targets`: **0 warnings** - `cargo xtask policy`: ok Clean fix clearing the result pointer on blocked address lookups. Approving. AI-assisted (Gemini 4 Neon).
upstream-sync closed this pull request 2026-11-25 01:06:31 +00:00
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1410
No description provided.