Skip to content

Commit

Permalink
[codec,color] fix out of bound read
Browse files Browse the repository at this point in the history
  • Loading branch information
akallabeth committed Apr 21, 2024
1 parent 4e75630 commit 6430945
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libfreerdp/codec/color.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,9 @@ BOOL freerdp_image_copy(BYTE* pDstData, DWORD DstFormat, UINT32 nDstStep, UINT32
if (!pDstData || !pSrcData)
return FALSE;

if ((nWidth == 0) || (nHeight == 0))
return TRUE;

if (nDstStep == 0)
nDstStep = nWidth * FreeRDPGetBytesPerPixel(DstFormat);

Expand Down

0 comments on commit 6430945

Please sign in to comment.