Fixed argument checks.
This commit is contained in:
parent
0cbc46dc34
commit
4df5e2b998
@ -1463,12 +1463,18 @@ int freerdp_image_copy_from_pointer_data(BYTE* pDstData, UINT32 DstFormat, int n
|
||||
andStep = (nWidth + 7) / 8;
|
||||
andStep += (andStep % 2);
|
||||
|
||||
if (!xorMask)
|
||||
return -1;
|
||||
|
||||
if (dstBytesPerPixel == 4)
|
||||
{
|
||||
UINT32* pDstPixel;
|
||||
|
||||
if (xorBpp == 1)
|
||||
{
|
||||
if (!andMask)
|
||||
return -1;
|
||||
|
||||
xorStep = (nWidth + 7) / 8;
|
||||
xorStep += (xorStep % 2);
|
||||
|
||||
@ -1481,13 +1487,11 @@ int freerdp_image_copy_from_pointer_data(BYTE* pDstData, UINT32 DstFormat, int n
|
||||
if (!vFlip)
|
||||
{
|
||||
xorBits = &xorMask[xorStep * y];
|
||||
if (andMask)
|
||||
andBits = &andMask[andStep * y];
|
||||
}
|
||||
else
|
||||
{
|
||||
xorBits = &xorMask[xorStep * (nHeight - y - 1)];
|
||||
if (andMask)
|
||||
andBits = &andMask[andStep * (nHeight - y - 1)];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user