Commit 30c8da1c authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Do an explicit mmap address search for any range not covering the entire address space.

parent b862cc03
...@@ -1361,7 +1361,7 @@ static void *map_free_area( void *base, void *end, size_t size, int top_down, in ...@@ -1361,7 +1361,7 @@ static void *map_free_area( void *base, void *end, size_t size, int top_down, in
start = try_map_free_area( base, end, step, start, size, unix_prot ); start = try_map_free_area( base, end, step, start, size, unix_prot );
if (!start) if (!start)
ERR( "couldn't map free area in range %p-%p, size %p", base, end, (void *)size ); ERR( "couldn't map free area in range %p-%p, size %p\n", base, end, (void *)size );
return start; return start;
} }
...@@ -2031,7 +2031,7 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size, ...@@ -2031,7 +2031,7 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
goto done; goto done;
} }
if (limit_low || limit_high) if (start > address_space_start || end < address_space_limit || top_down)
{ {
if (!(ptr = map_free_area( start, end, size, top_down, get_unix_prot(vprot), align_mask ))) if (!(ptr = map_free_area( start, end, size, top_down, get_unix_prot(vprot), align_mask )))
return STATUS_NO_MEMORY; return STATUS_NO_MEMORY;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment