[ros-diffs] [cgutman] 54578: [NTOSKRNL] - Fix usage of SEH

cgutman at svn.reactos.org cgutman at svn.reactos.org
Sun Dec 4 06:11:48 UTC 2011


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=54578&r1=54577&r2=54578&view=diff
==============================================================================
--- 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;




More information about the Ros-diffs mailing list