Hi,

Please also revert the call to ExRaiseAccessViolation. The behaviour is semi-documented here: http://www.uninformed.org/?v=10&a=2 There's a small but potentially important difference, which is the value of the faulting address.

Thanks,
Timo

Am 23.03.2011 16:49, schrieb [email protected]:
Author: rharabien
Date: Wed Mar 23 15:49:44 2011
New Revision: 51126

URL: http://svn.reactos.org/svn/reactos?rev=51126&view=rev
Log:
[NTOSKRNL]
Revert r51108. ProbeForRead doesn't check if memory is readable.
Improve comments and replace trick raising exception with call to 
ExRaiseAccessViolation.

[WIN32K]
Remove ASSERTs in IntSetSysColors: this function is only called in 
NtUserSetSysColors in SEH block. It shouldn't crash for NULL pointers.

Modified:
     trunk/reactos/ntoskrnl/ex/exintrin.c
     trunk/reactos/subsystems/win32/win32k/objects/stockobj.c

Modified: trunk/reactos/ntoskrnl/ex/exintrin.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/exintrin.c?rev=51126&r1=51125&r2=51126&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ex/exintrin.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/exintrin.c [iso-8859-1] Wed Mar 23 15:49:44 2011
@@ -104,7 +104,6 @@
               IN ULONG Alignment)
  {
        ULONG_PTR Last, Current = (ULONG_PTR)Address;
-       CHAR Temp;
      PAGED_CODE();

      /* Only probe if we have a valid length */
@@ -132,16 +131,7 @@
              ExRaiseAccessViolation();
          }

-        /* Round down to the last page */
-        Last = PAGE_ROUND_DOWN(Last) + PAGE_SIZE;
-        do
-        {
-            /* Attempt a read */
-            Temp = *(volatile CHAR*)Current;
-
-            /* Go to the next address */
-            Current = PAGE_ROUND_DOWN(Current) + PAGE_SIZE;
-        } while (Current != Last);
+        /* ProbeForRead doesn't check if memory pages are readable! */
      }
  }


Modified: trunk/reactos/subsystems/win32/win32k/objects/stockobj.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/stockobj.c?rev=51126&r1=51125&r2=51126&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/stockobj.c [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/win32/win32k/objects/stockobj.c [iso-8859-1] Wed 
Mar 23 15:49:44 2011
@@ -221,9 +221,6 @@
  {
      UINT i;

-    ASSERT(Elements);
-    ASSERT(Colors);
-
      for (i = 0; i<  nColors; i++)
      {
          if ((UINT)(*Elements)<  NUM_SYSCOLORS)





_______________________________________________
Ros-dev mailing list
[email protected]
http://www.reactos.org/mailman/listinfo/ros-dev

Reply via email to