svn path=/trunk/; revision=17431
This commit is contained in:
Alex Ionescu 2005-08-18 21:25:04 +00:00
parent 9eeadb66ec
commit 20d4ebeffc
3 changed files with 100 additions and 87 deletions

View file

@ -492,6 +492,8 @@ typedef struct _CSR_API_MESSAGE
union
{
PORT_MESSAGE Header;
union
{
struct
{
BYTE HeaderReserved[sizeof(PORT_MESSAGE)];
@ -554,6 +556,8 @@ typedef struct _CSR_API_MESSAGE
CSRSS_GET_PROCESS_LIST GetProcessListRequest;
} Data;
};
UCHAR PadBuffer[PORT_MAXIMUM_MESSAGE_LENGTH];
};
};
} CSR_API_MESSAGE, *PCSR_API_MESSAGE;

View file

@ -111,27 +111,36 @@ typedef union _SM_PORT_MESSAGE
{
/*** LPC common header ***/
PORT_MESSAGE Header;
struct {
union
{
struct
{
UCHAR LpcHeader[sizeof(PORT_MESSAGE)];
/*** SM common header ***/
struct {
struct
{
DWORD ApiIndex;
NTSTATUS Status;
} SmHeader;
/*** SM per API arguments ***/
union {
union {
union
{
union
{
SM_PORT_MESSAGE_COMPSES CompSes;
SM_PORT_MESSAGE_EXECPGM ExecPgm;
SM_PORT_MESSAGE_QRYINFO QryInfo;
} Request;
union {
union
{
SM_PORT_MESSAGE_COMPSES CompSes;
SM_PORT_MESSAGE_EXECPGM ExecPgm;
SM_PORT_MESSAGE_QRYINFO QryInfo;
} Reply;
};
};
UCHAR PadBuffer[PORT_MAXIMUM_MESSAGE_LENGTH];
};
} SM_PORT_MESSAGE, * PSM_PORT_MESSAGE;
#include <poppack.h>

View file

@ -357,7 +357,7 @@ NtRequestWaitReplyPort (IN HANDLE PortHandle,
ObDereferenceObject(Port);
return(STATUS_PORT_MESSAGE_TOO_LONG);
}
if (LpcRequestDataSize != (LpcRequestMessageSize - sizeof(PORT_MESSAGE)))
if (LpcRequestDataSize > LPC_MAX_DATA_LENGTH)
{
ExFreePool(LpcRequest);
if (NULL != AttachedProcess)