From 990ba545379b253958403eeb0296527f01e5234c Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Wed, 24 Nov 2021 18:58:51 +0100 Subject: [PATCH] [NTOS:LPC] NtReplyWaitReceivePortEx returns the correct TotalLength for connect messages This fixes the NtAcceptConnectPort apitest. --- ntoskrnl/lpc/reply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntoskrnl/lpc/reply.c b/ntoskrnl/lpc/reply.c index 8454754c3aa..b3195e3826c 100644 --- a/ntoskrnl/lpc/reply.c +++ b/ntoskrnl/lpc/reply.c @@ -664,7 +664,7 @@ NtReplyWaitReceivePortEx(IN HANDLE PortHandle, Message = NULL; /* Setup the receive message */ - ReceiveMessage->u1.s1.TotalLength = (CSHORT)(sizeof(LPCP_MESSAGE) + + ReceiveMessage->u1.s1.TotalLength = (CSHORT)(sizeof(PORT_MESSAGE) + ConnectionInfoLength); ReceiveMessage->u1.s1.DataLength = (CSHORT)ConnectionInfoLength; RtlCopyMemory(ReceiveMessage + 1,