Author: cgutman
Date: Sun Dec 4 06:11:47 2011
New Revision: 54578
URL:
http://svn.reactos.org/svn/reactos?rev=54578&view=rev
Log:
[NTOSKRNL]
- Fix usage of SEH
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] Sun Dec 4 06:11:47 2011
@@ -1033,9 +1033,9 @@
/* Check for user-mode parameters */
if (PreviousMode != KernelMode)
{
- /* Make sure they are readable */
- ProbeForReadPointer(UBaseAddress);
- ProbeForReadUlong(URegionSize);
+ /* Make sure they are writeable */
+ ProbeForWritePointer(UBaseAddress);
+ ProbeForWriteUlong(URegionSize);
}
/* Capture their values */
@@ -1186,14 +1186,6 @@
/* Enter SEH */
_SEH2_TRY
{
- /* Check for user-mode parameters */
- if (PreviousMode != KernelMode)
- {
- /* Make sure they are writable */
- ProbeForWritePointer(UBaseAddress);
- ProbeForWriteUlong(URegionSize);
- }
-
/* Copy rounded values back in success case */
*UBaseAddress = BaseAddress;
*URegionSize = RegionSize;