Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix segfault if high-entropy 64-bit ASLR is enabled
If the High-entropy ASLR setting is enabled on Windows, `win32/dir` will segfault when calling `SHGetFileInfo`. Enabling high-entropy ASLR will cause processes to use the entire 64-bit address space, and the `long` data type is not large enough to hold a 64-bit address for the PIDL structure (which is the first argument of `SHGetFileInfo`[1]). As a result, the call segfaults. Change the parameter's data type to `uint64` to ensure that the address will always fit. [1] https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shgetfileinfow Signed-off-by: Gabriel Nagy <[email protected]>
- Loading branch information