ntdll: Don't use the mapping handle to detect file mappings.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2017-09-13 11:48:57 +02:00
parent 3f0362ec3c
commit bf8e71bcab
1 changed files with 2 additions and 1 deletions

View File

@ -2000,7 +2000,8 @@ void VIRTUAL_SetForceExec( BOOL enable )
WINE_RB_FOR_EACH_ENTRY( view, &views_tree, struct file_view, entry )
{
BYTE commit = view->mapping ? VPROT_COMMITTED : 0; /* file mappings are always accessible */
/* file mappings are always accessible */
BYTE commit = is_view_valloc( view ) ? 0 : VPROT_COMMITTED;
mprotect_range( view, view->base, view->size, commit, 0 );
}