[codec,color] check for image_copy widht or height 0

This commit is contained in:
akallabeth 2024-05-25 08:06:59 +02:00
parent 53d8e0f203
commit 5fe0c5f9fc
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
1 changed files with 6 additions and 0 deletions

View File

@ -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;