Skip to content

Conversation

squeek502
Copy link
Collaborator

@squeek502 squeek502 commented Mar 26, 2025

Previously: #19698

Context:

Note that the Rust test case for this checks that it executes the batch file successfully with the proper mitigation in place, while the Zig test case expects a FileNotFound error. This is because of a PATHEXT optimization that Zig does, and that Rust doesn't do because Rust doesn't do PATHEXT appending (it only appends .exe specifically, see #13993 (comment)). See the added comment for more details.

…space safely

Context:
- https://blog.rust-lang.org/2024/09/04/cve-2024-43402.html
- rust-lang/rust#129962

Note that the Rust test case for this checks that it executes the batch file successfully with the proper mitigation in place, while the Zig test case expects a FileNotFound error. This is because of a PATHEXT optimization that Zig does, and that Rust doesn't do because Rust doesn't do PATHEXT appending (it only appends .exe specifically). See the added comment for more details.
@alexrp alexrp merged commit 63014d3 into ziglang:master Mar 26, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants