rpcrt4: Fix an off-by-one error when checking the size of the buffer in NdrInterfacePointerMarshall.

This commit is contained in:
Robert Shearman 2006-05-18 03:40:29 +01:00 committed by Alexandre Julliard
parent 855535af62
commit 9b3cecaeb5
1 changed files with 1 additions and 1 deletions

View File

@ -254,7 +254,7 @@ unsigned char * WINAPI NdrInterfacePointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
TRACE("(%p,%p,%p)\n", pStubMsg, pMemory, pFormat); TRACE("(%p,%p,%p)\n", pStubMsg, pMemory, pFormat);
pStubMsg->MaxCount = 0; pStubMsg->MaxCount = 0;
if (!LoadCOM()) return NULL; if (!LoadCOM()) return NULL;
if (pStubMsg->Buffer + sizeof(DWORD) < (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength) { if (pStubMsg->Buffer + sizeof(DWORD) <= (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength) {
stream = RpcStream_Create(pStubMsg, TRUE); stream = RpcStream_Create(pStubMsg, TRUE);
if (stream) { if (stream) {
if (pMemory) if (pMemory)