mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +00:00
fix some kernel32 virtual winetests
svn path=/trunk/; revision=38928
This commit is contained in:
parent
2fef907b66
commit
d318fedb6d
1 changed files with 7 additions and 1 deletions
|
@ -569,7 +569,7 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
|
|||
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 @@ NtFreeVirtualMemory(IN HANDLE ProcessHandle,
|
|||
"*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));
|
||||
|
|
Loading…
Reference in a new issue