mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 02:15:43 +00:00
[WIN32K]
Make sure to check for invalid NULL handles before passing them to GDIOBJ_bLockMultipleObjects, which skips NULL handles. This is a design limitation, since otherwise we either need to pass a bitfield of valid handles, or duplicate code in certain functions, where different combinations of dest, source and mask dc are allowed. svn path=/trunk/; revision=63442
This commit is contained in:
parent
aaedf937d2
commit
f01e92424a
1 changed files with 14 additions and 2 deletions
|
@ -47,6 +47,12 @@ NtGdiAlphaBlend(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((hDCDest == NULL) || (hDCSrc == NULL))
|
||||||
|
{
|
||||||
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
TRACE("Locking DCs\n");
|
TRACE("Locking DCs\n");
|
||||||
ahDC[0] = hDCDest;
|
ahDC[0] = hDCDest;
|
||||||
ahDC[1] = hDCSrc ;
|
ahDC[1] = hDCSrc ;
|
||||||
|
@ -161,14 +167,14 @@ NtGdiBitBlt(
|
||||||
return NtGdiStretchBlt(hDCDest,
|
return NtGdiStretchBlt(hDCDest,
|
||||||
XDest,
|
XDest,
|
||||||
YDest,
|
YDest,
|
||||||
Width,
|
Width,
|
||||||
Height,
|
Height,
|
||||||
hDCSrc,
|
hDCSrc,
|
||||||
XSrc,
|
XSrc,
|
||||||
YSrc,
|
YSrc,
|
||||||
Width,
|
Width,
|
||||||
Height,
|
Height,
|
||||||
ROP,
|
ROP,
|
||||||
crBackColor);
|
crBackColor);
|
||||||
|
|
||||||
dwTRop = ROP & ~(NOMIRRORBITMAP|CAPTUREBLT);
|
dwTRop = ROP & ~(NOMIRRORBITMAP|CAPTUREBLT);
|
||||||
|
@ -213,6 +219,12 @@ NtGdiTransparentBlt(
|
||||||
BOOL Ret = FALSE;
|
BOOL Ret = FALSE;
|
||||||
EXLATEOBJ exlo;
|
EXLATEOBJ exlo;
|
||||||
|
|
||||||
|
if ((hdcDst == NULL) || (hdcSrc == NULL))
|
||||||
|
{
|
||||||
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
TRACE("Locking DCs\n");
|
TRACE("Locking DCs\n");
|
||||||
ahDC[0] = hdcDst;
|
ahDC[0] = hdcDst;
|
||||||
ahDC[1] = hdcSrc ;
|
ahDC[1] = hdcSrc ;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue