Module: wine Branch: master Commit: f03c3a167c2e4abe92b1e1bf2ea5f7c31a07fc3b URL: https://gitlab.winehq.org/wine/wine/-/commit/f03c3a167c2e4abe92b1e1bf2ea5f7c...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Dec 8 16:13:51 2023 +0100
ntdll: Only free reserved memory for HIGH_ENTROPY_VA binaries.
To avoid triggering pointer-truncation bugs in applications.
---
dlls/ntdll/unix/virtual.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 75e6319c007..5bdeef4c1bc 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -4397,7 +4397,7 @@ void virtual_set_large_address_space(void) if (is_wow64()) user_space_wow_limit = ((main_image_info.ImageCharacteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE) ? limit_4g : limit_2g) - 1; #ifndef __APPLE__ /* don't free the zerofill section on macOS */ - else + else if (main_image_info.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA) free_reserved_memory( 0, (char *)0x7ffe0000 ); #endif }