Commit c4fba638 authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard

ntdll: Respect zero_bits/limit when mapping a PE file.

parent 82c96f94
...@@ -1923,6 +1923,8 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size, ...@@ -1923,6 +1923,8 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
{ {
if (is_beyond_limit( base, size, address_space_limit )) if (is_beyond_limit( base, size, address_space_limit ))
return STATUS_WORKING_SET_LIMIT_RANGE; return STATUS_WORKING_SET_LIMIT_RANGE;
if (limit && is_beyond_limit( base, size, (void *)limit ))
return STATUS_CONFLICTING_ADDRESSES;
status = map_fixed_area( base, size, vprot ); status = map_fixed_area( base, size, vprot );
if (status != STATUS_SUCCESS) return status; if (status != STATUS_SUCCESS) return status;
ptr = base; ptr = base;
......
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