[ros-diffs] [dchapyshev] 41407: - Add SectionHandle probing

dchapyshev at svn.reactos.org dchapyshev at svn.reactos.org
Sun Jun 14 10:57:26 CEST 2009


Author: dchapyshev
Date: Sun Jun 14 12:57:25 2009
New Revision: 41407

URL: http://svn.reactos.org/svn/reactos?rev=41407&view=rev
Log:
- Add SectionHandle probing

Modified:
    trunk/reactos/ntoskrnl/mm/section.c

Modified: trunk/reactos/ntoskrnl/mm/section.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=41407&r1=41406&r2=41407&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Sun Jun 14 12:57:25 2009
@@ -3498,13 +3498,17 @@
 
    PreviousMode = ExGetPreviousMode();
 
-   if(MaximumSize != NULL && PreviousMode != KernelMode)
+   if(PreviousMode != KernelMode)
    {
      _SEH2_TRY
      {
-       /* make a copy on the stack */
-       SafeMaximumSize = ProbeForReadLargeInteger(MaximumSize);
-       MaximumSize = &SafeMaximumSize;
+       if (MaximumSize != NULL)
+       {
+          /* make a copy on the stack */
+          SafeMaximumSize = ProbeForReadLargeInteger(MaximumSize);
+          MaximumSize = &SafeMaximumSize;
+       }
+       ProbeForWriteHandle(SectionHandle);
      }
      _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
      {
@@ -4238,6 +4242,7 @@
    PROS_SECTION_OBJECT Section;
    KPROCESSOR_MODE PreviousMode;
    NTSTATUS Status = STATUS_SUCCESS;
+   PAGED_CODE();
 
    PreviousMode = ExGetPreviousMode();
 



More information about the Ros-diffs mailing list