From a2d8fe55977d458782727b60accb5510264e3f75 Mon Sep 17 00:00:00 2001
From: Hans Leidekker <hans@codeweavers.com>
Date: Thu, 28 Oct 2021 20:19:24 +0200
Subject: [PATCH] secur32: Fix expected buffer size in trace message.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
---
 dlls/secur32/schannel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
index eb8106e88c7..885fabfac13 100644
--- a/dlls/secur32/schannel.c
+++ b/dlls/secur32/schannel.c
@@ -1003,7 +1003,7 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
             if (!expected_size)
             {
                 TRACE("Expected at least %lu bytes, but buffer only contains %u bytes.\n",
-                      max(6, record_size), buffer->cbBuffer);
+                      max(ctx->header_size + 1, record_size), buffer->cbBuffer);
                 return SEC_E_INCOMPLETE_MESSAGE;
             }
         }
-- 
GitLab