Merge pull request #5062 from akallabeth/init_freerdp_image_copy_from_pointer_data

Fix #5061: Initialize output buffer transparent.
This commit is contained in:
Martin Fleisz 2018-12-05 10:57:43 +01:00 committed by GitHub
commit 30b31b7fb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -179,6 +179,12 @@ BOOL freerdp_image_copy_from_pointer_data(
if (nDstStep <= 0)
nDstStep = dstBytesPerPixel * nWidth;
for (y = nYDst; y < nHeight; y++)
{
BYTE* pDstLine = &pDstData[y * nDstStep + nXDst * dstBytesPerPixel];
memset(pDstLine, 0, dstBytesPerPixel * (nWidth - nXDst));
}
vFlip = (xorBpp == 1) ? FALSE : TRUE;
andStep = (nWidth + 7) / 8;
andStep += (andStep % 2);