Merge pull request #11226 from Devolutions/faulty_string_length_check_in_credssp_auth

[core,credssp_auth] Fix faulty string length check in `credssp_auth_client_init_cred_attributes`
This commit is contained in:
akallabeth
2025-02-22 14:37:19 +01:00
committed by GitHub

View File

@@ -207,7 +207,7 @@ static BOOL credssp_auth_client_init_cred_attributes(rdpCredsspAuth* auth)
SSIZE_T str_size = 0;
str_size = ConvertUtf8ToWChar(auth->kerberosSettings.kdcUrl, NULL, 0);
if ((str_size <= 0) || (str_size <= UINT16_MAX / 2))
if ((str_size <= 0) || (str_size >= UINT16_MAX / 2))
return FALSE;
str_size++;