mirror of
https://github.com/reactos/reactos.git
synced 2024-07-12 07:35:10 +00:00
Add check for global handles to NtGdiDeleteDC, this prevents applications from destroying DCs that are part of DCEs.
svn path=/trunk/; revision=16748
This commit is contained in:
parent
fc8add5154
commit
609a60c719
|
@ -962,10 +962,17 @@ NtGdiDeleteDC(HDC DCHandle)
|
|||
{
|
||||
PDC DCToDelete;
|
||||
|
||||
if (!GDIOBJ_OwnedByCurrentProcess(DCHandle))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DCToDelete = DC_LockDc(DCHandle);
|
||||
if (DCToDelete == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* First delete all saved DCs */
|
||||
|
|
Loading…
Reference in a new issue