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

Alexandre Julliard julliard at winehq.org
Wed Sep 13 14:47:03 CDT 2017


Module: wine
Branch: master
Commit: bf8e71bcab96598013f18502b7f46c6772d54bae
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bf8e71bcab96598013f18502b7f46c6772d54bae

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Sep 13 11:48:57 2017 +0200

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

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/virtual.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index b08bde7..e4896ea 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -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 );
         }




More information about the wine-cvs mailing list