Author: tkreuzer Date: Tue Mar 29 15:35:10 2011 New Revision: 51194
URL: http://svn.reactos.org/svn/reactos?rev=51194&view=rev Log: [WIN32K] Addendum to r51188: set last error, when overflow check fails. Fixes test regression.
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] Tue Mar 29 15:35:10 2011 @@ -84,11 +84,11 @@ Ret = NtGdiBitBlt( hdc, nXDest, nYDest, - nWidth, - nHeight, + nWidth, + nHeight, hSystemBM, - nXSrc, - nYSrc, + nXSrc, + nYSrc, dwRop, 0, 0); @@ -255,7 +255,7 @@ APIENTRY NtUserGetControlColor( HWND hwndParent, - HWND hwnd, + HWND hwnd, HDC hdc, UINT CtlMsg) // Wine PaintRect: WM_CTLCOLORMSGBOX + hbrush { @@ -380,7 +380,7 @@ DPRINT1("Failed reading Client Pfns from user space.\n"); SetLastNtError(Status); } - + UserLeave(); return Status; } @@ -543,8 +543,12 @@ if (cElements == 0) return TRUE;
+ /* We need this check to prevent overflow later */ if ((ULONG)cElements >= 0x40000000) + { + EngSetLastError(ERROR_NOACCESS); return FALSE; + }
UserEnterExclusive();