Commit 9eae2d71 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Round up the mapping size in map_file_into_view when setting

the protection bytes.
parent 79575a8a
......@@ -727,7 +727,7 @@ static NTSTATUS map_file_into_view( struct file_view *view, int fd, size_t start
pread( fd, ptr, size, offset );
if (prot != (PROT_READ|PROT_WRITE)) mprotect( ptr, size, prot ); /* Set the right protection */
done:
memset( view->prot + (start >> page_shift), vprot, size >> page_shift );
memset( view->prot + (start >> page_shift), vprot, ROUND_SIZE(start,size) >> page_shift );
return STATUS_SUCCESS;
}
......
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