From 0a34b1e95d781624d428b37fa674099d06c5c74e Mon Sep 17 00:00:00 2001 From: akallabeth Date: Thu, 11 Apr 2024 14:50:50 +0200 Subject: [PATCH] [coverity] 1543271 Explicit null dereferenced --- winpr/libwinpr/sspi/Negotiate/negotiate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winpr/libwinpr/sspi/Negotiate/negotiate.c b/winpr/libwinpr/sspi/Negotiate/negotiate.c index 69e428ce2..d6185160e 100644 --- a/winpr/libwinpr/sspi/Negotiate/negotiate.c +++ b/winpr/libwinpr/sspi/Negotiate/negotiate.c @@ -675,6 +675,9 @@ static SECURITY_STATUS SEC_ENTRY negotiate_InitializeSecurityContextW( if (!init_context.mech) { /* Use the output buffer to store the optimistic token */ + if (!output_buffer) + goto cleanup; + CopyMemory(&output_token.mechToken, output_buffer, sizeof(SecBuffer)); if (bindings_buffer)