Author: ion Date: Mon Oct 30 19:50:20 2006 New Revision: 24677
URL: http://svn.reactos.org/svn/reactos?rev=24677&view=rev Log: - Fix parameter checks in NtAcceptConnectPort. - Make CSRSS properly fill out the ServerView structure's length so that it can be validated by the kernel.
Modified: trunk/reactos/ntoskrnl/lpc/ntlpc/complete.c trunk/reactos/subsystems/win32/csrss/api/wapi.c
Modified: trunk/reactos/ntoskrnl/lpc/ntlpc/complete.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/ntlpc/complete... ============================================================================== --- trunk/reactos/ntoskrnl/lpc/ntlpc/complete.c (original) +++ trunk/reactos/ntoskrnl/lpc/ntlpc/complete.c Mon Oct 30 19:50:20 2006 @@ -65,14 +65,14 @@ ServerView);
/* Validate the size of the server view */ - if ((ServerView) && (ServerView->Length != sizeof(PORT_VIEW))) + if ((ServerView) && (ServerView->Length != sizeof(REMOTE_PORT_VIEW))) { /* Invalid size */ return STATUS_INVALID_PARAMETER; }
/* Validate the size of the client view */ - if ((ClientView) && (ClientView->Length != sizeof(REMOTE_PORT_VIEW))) + if ((ClientView) && (ClientView->Length != sizeof(PORT_VIEW))) { /* Invalid size */ return STATUS_INVALID_PARAMETER;
Modified: trunk/reactos/subsystems/win32/csrss/api/wapi.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/api/... ============================================================================== --- trunk/reactos/subsystems/win32/csrss/api/wapi.c (original) +++ trunk/reactos/subsystems/win32/csrss/api/wapi.c Mon Oct 30 19:50:20 2006 @@ -222,6 +222,7 @@ for (;;) { REMOTE_PORT_VIEW LpcRead; + LpcRead.Length = sizeof(LpcRead); ServerPort = NULL;
Status = NtListenPort (hApiListenPort, Request);