mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user