From 6f2caef77859a51528fd5a8a625f9ce70d56d31d Mon Sep 17 00:00:00 2001 From: "Pascal J. Bourguignon" Date: Tue, 6 Nov 2018 11:20:02 +0100 Subject: [PATCH] Fix Issue #4983 : Increased size of buffer to encrypt hash with kerberos. --- libfreerdp/core/nla.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libfreerdp/core/nla.c b/libfreerdp/core/nla.c index 2b3288e28..58ea0f237 100644 --- a/libfreerdp/core/nla.c +++ b/libfreerdp/core/nla.c @@ -1126,9 +1126,7 @@ SECURITY_STATUS nla_encrypt_public_key_hash(rdpNla* nla) SECURITY_STATUS status = SEC_E_INTERNAL_ERROR; WINPR_DIGEST_CTX* sha256 = NULL; const BOOL krb = (_tcsncmp(nla->packageName, KERBEROS_SSP_NAME, ARRAYSIZE(KERBEROS_SSP_NAME)) == 0); - const ULONG auth_data_length = krb ? WINPR_SHA256_DIGEST_LENGTH : - (nla->ContextSizes.cbSecurityTrailer - + WINPR_SHA256_DIGEST_LENGTH); + const ULONG auth_data_length = (nla->ContextSizes.cbSecurityTrailer + WINPR_SHA256_DIGEST_LENGTH); const BYTE* hashMagic = nla->server ? ServerClientHashMagic : ClientServerHashMagic; const size_t hashSize = nla->server ? sizeof(ServerClientHashMagic) : sizeof(ClientServerHashMagic);