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.
svn path=/trunk/; revision=51126
IN ULONG Alignment)
{
ULONG_PTR Last, Current = (ULONG_PTR)Address;
- CHAR Temp;
PAGED_CODE();
/* Only probe if we have a valid length */
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! */
}
}
{
UINT i;
- ASSERT(Elements);
- ASSERT(Colors);
-
for (i = 0; i < nColors; i++)
{
if ((UINT)(*Elements) < NUM_SYSCOLORS)