You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test that empty EXEPATH doesn't trigger the optimization
The `EXEPATH` optimization in `system_prefix()` on Windows relies
on `EXEPATH` either being unset or set to a value where it is okay
to attempt to find and use `clangarm64`, `mingw64`, and `mingw32`
subdirectories. Like most environment variables, `EXEPATH` is
unlikely to be directly controllable by an attacker. But it may
exist with a different meaning from any we (and Git for Windows)
intend. It also may inadvertently be set to an empty string, or
intnetionally set to a relative path; in either case, we cannot
safely use it for the `EXEPATH` optimization in `system_prefix()`.
In particular, if it is an empty string, then an attempt would be
made to use a `clangarm64`, `mingw64`, or `mingw32` subdirectory of
the current working directory.
This test will fail until the `EXEPATH` optimization is refined to
bail out--and fall back to the more robust strategy--if `EXEPATH`
is an empty string, or under broader conditions such as it not
being an absolute path.
0 commit comments