Alexandre Julliard : ntdll: Explicitly check for failure to map page 0.
Alexandre Julliard
julliard at winehq.org
Thu Nov 4 12:52:53 CDT 2010
Module: wine
Branch: master
Commit: 3aa6e3bd899c158f043bda300689829ef3b55b9d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3aa6e3bd899c158f043bda300689829ef3b55b9d
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Nov 4 17:47:46 2010 +0100
ntdll: Explicitly check for failure to map page 0.
---
dlls/ntdll/virtual.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 1674a3e..ea1400e 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -993,8 +993,12 @@ static NTSTATUS allocate_dos_memory( struct file_view **view, unsigned int vprot
addr = wine_anon_mmap( (void *)page_size, 0x10000 - page_size, unix_prot, 0 );
if (addr == (void *)page_size)
{
- addr = NULL;
- TRACE( "successfully mapped low 64K range\n" );
+ if (!wine_anon_mmap( NULL, page_size, unix_prot, MAP_FIXED ))
+ {
+ addr = NULL;
+ TRACE( "successfully mapped low 64K range\n" );
+ }
+ else TRACE( "failed to map page 0\n" );
}
else
{
More information about the wine-cvs
mailing list