And here goes another test for two unsupported flags.
Modified: trunk/reactos/ntoskrnl/mm/anonmem.c
_____
Modified: trunk/reactos/ntoskrnl/mm/anonmem.c
--- trunk/reactos/ntoskrnl/mm/anonmem.c 2005-08-07 07:14:52 UTC (rev
17140)
+++ trunk/reactos/ntoskrnl/mm/anonmem.c 2005-08-07 07:30:46 UTC (rev
17141)
@@ -646,6 +646,18 @@
return STATUS_INVALID_PARAMETER_4;
}
+ /*
+ * Copy on Write is reserved for system use. This case is a certain
failure
+ * but there may be other cases...needs more testing
+ */
+ if ((!BaseAddress || (AllocationType & MEM_RESERVE)) &&
+ ((Protect & PAGE_WRITECOPY) || (Protect &
PAGE_EXECUTE_WRITECOPY)))
+ {
+ DPRINT1("Copy on write is not supported by VirtualAlloc\n");
+ return STATUS_INVALID_PAGE_PROTECTION;
+ }
+
+
Status = ObReferenceObjectByHandle(ProcessHandle,
PROCESS_VM_OPERATION,
NULL,
Show replies by date