From c9850bb299dd34bdca3582ae371bd27e18f997d5 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 12 Apr 2024 10:48:16 +0200 Subject: [PATCH] [coverity] 1543134 Explicit null dereferenced --- winpr/libwinpr/sspi/Negotiate/negotiate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/winpr/libwinpr/sspi/Negotiate/negotiate.c b/winpr/libwinpr/sspi/Negotiate/negotiate.c index bf8da1ec6..66d8d53f8 100644 --- a/winpr/libwinpr/sspi/Negotiate/negotiate.c +++ b/winpr/libwinpr/sspi/Negotiate/negotiate.c @@ -1135,7 +1135,8 @@ static SECURITY_STATUS SEC_ENTRY negotiate_AcceptSecurityContext( return SEC_E_INVALID_TOKEN; /* Use the output buffer to store the optimistic token */ - CopyMemory(&output_token.mechToken, output_buffer, sizeof(SecBuffer)); + if (output_buffer) + CopyMemory(&output_token.mechToken, output_buffer, sizeof(SecBuffer)); status = context->mech->pkg->table->AcceptSecurityContext( sub_cred, &context->sub_context, &mech_input, fContextReq | context->mech->flags,