Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segfault if high-entropy 64-bit ASLR is enabled #28

Merged
merged 1 commit into from
Nov 30, 2020

Commits on Sep 25, 2020

  1. 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]>
    GabrielNagy committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    cf3e31e View commit details
    Browse the repository at this point in the history