[libfreerdp] add null pointer check in planar_decompress()

In Windows remote run vulnerabillities exe program, to create rdpgrfx
channel, may case Remmina crash.
So, add null pointer check to pSrcData.
This commit is contained in:
houchengqiu
2023-05-22 16:12:08 +08:00
committed by akallabeth
parent 7daaba3c14
commit 7fe1f15edd

View File

@@ -715,11 +715,20 @@ BOOL planar_decompress(BITMAP_PLANAR_CONTEXT* planar, const BYTE* pSrcData, UINT
const UINT32 h = MIN(nSrcHeight, nDstHeight);
const primitives_t* prims = primitives_get();
WINPR_ASSERT(planar);
WINPR_ASSERT(prims);
if (nDstStep <= 0)
nDstStep = nDstWidth * FreeRDPGetBytesPerPixel(DstFormat);
srcp = pSrcData;
if (!pSrcData)
{
WLog_ERR(TAG, "Invalid argument pSrcData=NULL");
return FALSE;
}
if (!pDstData)
{
WLog_ERR(TAG, "Invalid argument pDstData=NULL");