[warnings] fix cast warnings

This commit is contained in:
akallabeth
2024-12-10 17:23:54 +01:00
parent f2f81eaac2
commit a3db26c57a
5 changed files with 102 additions and 54 deletions

View File

@@ -876,7 +876,8 @@ BYTE* freerdp_assistance_encrypt_pass_stub(const char* password, const char* pas
if (!pbIn || !pbOut)
goto fail;
winpr_Data_Write_UINT32(pbIn, cbPassStubW);
WINPR_ASSERT(cbPasswordW <= UINT32_MAX);
winpr_Data_Write_UINT32(pbIn, (UINT32)cbPassStubW);
CopyMemory(&pbIn[4], PassStubW, cbPassStubW);
rc4Ctx = winpr_RC4_New(PasswordHash, sizeof(PasswordHash));