ntdll: Round up the mapping size in map_file_into_view when setting

the protection bytes.
This commit is contained in:
Alexandre Julliard 2006-01-11 20:59:07 +01:00
parent 79575a8aff
commit 9eae2d714d
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}