From cd0a33dbf248b4728f79be566fb8487bff0f44e6 Mon Sep 17 00:00:00 2001 From: David Fort Date: Fri, 7 Oct 2022 17:25:47 +0200 Subject: [PATCH] nla: context must be NULL on first call to AcceptSecurityContext or InitializeSecurityContext --- libfreerdp/core/credssp_auth.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libfreerdp/core/credssp_auth.c b/libfreerdp/core/credssp_auth.c index 97578915f..1bc1c747c 100644 --- a/libfreerdp/core/credssp_auth.c +++ b/libfreerdp/core/credssp_auth.c @@ -279,8 +279,12 @@ int credssp_auth_authenticate(rdpCredsspAuth* auth) return -1; } - /* Context and input buffer will be null on first call */ + /* input buffer will be null on first call, + * context MUST be NULL on first call */ context = &auth->context; + if (!auth->context.dwLower && !auth->context.dwUpper) + context = NULL; + input_buffers[0] = auth->input_buffer; if (auth->bindings)