mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 22:56:00 +00:00
[NTGDI] AlphaBlend/TransparentBlt: check whether the source DC is an INFO DC too (#6885)
Improve checks in AlphaBlend and TransparentBlt functions: check whether DCSrc is of DCTYPE_INFO also, to fail in that case properly too. Spotted by PVS-Studio analysis. Reference: https://pvs-studio.com/en/blog/posts/cpp/1122/.
This commit is contained in:
parent
2b0d1faaa9
commit
96acfcb3dc
1 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ NtGdiAlphaBlend(
|
||||||
DCDest = apObj[0];
|
DCDest = apObj[0];
|
||||||
DCSrc = apObj[1];
|
DCSrc = apObj[1];
|
||||||
|
|
||||||
if (DCDest->dctype == DCTYPE_INFO || DCDest->dctype == DCTYPE_INFO)
|
if (DCSrc->dctype == DCTYPE_INFO || DCDest->dctype == DCTYPE_INFO)
|
||||||
{
|
{
|
||||||
GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
|
GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
|
||||||
GDIOBJ_vUnlockObject(&DCDest->BaseObject);
|
GDIOBJ_vUnlockObject(&DCDest->BaseObject);
|
||||||
|
@ -239,7 +239,7 @@ NtGdiTransparentBlt(
|
||||||
DCDest = apObj[0];
|
DCDest = apObj[0];
|
||||||
DCSrc = apObj[1];
|
DCSrc = apObj[1];
|
||||||
|
|
||||||
if (DCDest->dctype == DCTYPE_INFO || DCDest->dctype == DCTYPE_INFO)
|
if (DCSrc->dctype == DCTYPE_INFO || DCDest->dctype == DCTYPE_INFO)
|
||||||
{
|
{
|
||||||
GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
|
GDIOBJ_vUnlockObject(&DCSrc->BaseObject);
|
||||||
GDIOBJ_vUnlockObject(&DCDest->BaseObject);
|
GDIOBJ_vUnlockObject(&DCDest->BaseObject);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue