Rémi Bernon : ntdll: Start find_free_area from address_space_start instead of 0.
Alexandre Julliard
julliard at winehq.org
Fri Dec 27 15:47:36 CST 2019
Module: wine
Branch: master
Commit: 5eca6ffa8b392ac852324a5be3cc88d8e60197a8
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5eca6ffa8b392ac852324a5be3cc88d8e60197a8
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Thu Dec 26 22:27:28 2019 +0100
ntdll: Start find_free_area from address_space_start instead of 0.
The search was initiated with base == 0, which returns NULL immediately
if MEM_TOP_DOWN is not used. Use address_space_start instead.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47974
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/virtual.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 953cf58901..5890344f7a 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -1267,7 +1267,7 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
if (zero_bits_64)
{
- if (!(ptr = map_free_area( (void*)0, alloc.limit, size, mask, top_down, VIRTUAL_GetUnixProt(vprot) )))
+ if (!(ptr = map_free_area( address_space_start, alloc.limit, size, mask, top_down, VIRTUAL_GetUnixProt(vprot) )))
return STATUS_NO_MEMORY;
TRACE( "got mem with map_free_area %p-%p\n", ptr, (char *)ptr + size );
goto done;
More information about the wine-cvs
mailing list