mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 14:56:31 +00:00
- Handle UnsafeRect == NULL case in NtUserGetUpdateRect.
svn path=/trunk/; revision=10054
This commit is contained in:
parent
35a256ae2b
commit
79a4726093
1 changed files with 8 additions and 5 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Id: painting.c,v 1.83 2004/05/15 08:01:56 gvg Exp $
|
* $Id: painting.c,v 1.84 2004/07/09 20:13:00 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -914,11 +914,14 @@ NtUserGetUpdateRect(HWND Wnd, LPRECT UnsafeRect, BOOL Erase)
|
||||||
RGNDATA_UnlockRgn(Rgn);
|
RGNDATA_UnlockRgn(Rgn);
|
||||||
NtGdiDeleteObject(Rgn);
|
NtGdiDeleteObject(Rgn);
|
||||||
|
|
||||||
Status = MmCopyToCaller(UnsafeRect, &Rect, sizeof(RECT));
|
if (UnsafeRect != NULL)
|
||||||
if (! NT_SUCCESS(Status))
|
|
||||||
{
|
{
|
||||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
Status = MmCopyToCaller(UnsafeRect, &Rect, sizeof(RECT));
|
||||||
return FALSE;
|
if (! NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Rect.left < Rect.right && Rect.top < Rect.bottom;
|
return Rect.left < Rect.right && Rect.top < Rect.bottom;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue