mirror of https://github.com/FreeRDP/FreeRDP
[codec,color] check for image_copy widht or height 0
This commit is contained in:
parent
53d8e0f203
commit
5fe0c5f9fc
|
@ -593,6 +593,9 @@ BOOL freerdp_image_copy_no_overlap(BYTE* WINPR_RESTRICT pDstData, DWORD DstForma
|
|||
SSIZE_T dstVOffset = 0;
|
||||
SSIZE_T dstVMultiplier = 1;
|
||||
|
||||
if ((nWidth == 0) || (nHeight == 0))
|
||||
return TRUE;
|
||||
|
||||
if ((nHeight > INT32_MAX) || (nWidth > INT32_MAX))
|
||||
return FALSE;
|
||||
|
||||
|
@ -711,6 +714,9 @@ BOOL freerdp_image_copy_overlap(BYTE* pDstData, DWORD DstFormat, UINT32 nDstStep
|
|||
SSIZE_T dstVOffset = 0;
|
||||
SSIZE_T dstVMultiplier = 1;
|
||||
|
||||
if ((nWidth == 0) || (nHeight == 0))
|
||||
return TRUE;
|
||||
|
||||
if ((nHeight > INT32_MAX) || (nWidth > INT32_MAX))
|
||||
return FALSE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue