Author: cwittich
Date: Mon Jan 19 02:02:26 2009
New Revision: 38928
URL:
http://svn.reactos.org/svn/reactos?rev=38928&view=rev
Log:
fix some kernel32 virtual winetests
Modified:
trunk/reactos/ntoskrnl/mm/anonmem.c
Modified: trunk/reactos/ntoskrnl/mm/anonmem.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/anonmem.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] Mon Jan 19 02:02:26 2009
@@ -569,7 +569,7 @@
Protect);
/* Check for valid protection flags */
- if ((Protect & PAGE_FLAGS_VALID_FROM_USER_MODE) != Protect)
+ if ((!Protect & PAGE_FLAGS_VALID_FROM_USER_MODE))
{
DPRINT1("Invalid page protection\n");
return STATUS_INVALID_PAGE_PROTECTION;
@@ -944,6 +944,12 @@
"*PRegionSize %x, FreeType %x)\n",ProcessHandle,*PBaseAddress,
*PRegionSize,FreeType);
+ if (!(FreeType & (MEM_RELEASE | MEM_DECOMMIT)))
+ {
+ DPRINT1("Invalid FreeType\n");
+ return STATUS_INVALID_PARAMETER_4;
+ }
+
BaseAddress = (PVOID)PAGE_ROUND_DOWN((*PBaseAddress));
RegionSize = PAGE_ROUND_UP((ULONG_PTR)(*PBaseAddress) + (*PRegionSize)) -
PAGE_ROUND_DOWN((*PBaseAddress));