Commit 9b3cecae authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

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

rpcrt4: Fix an off-by-one error when checking the size of the buffer in NdrInterfacePointerMarshall.
parent 855535af
...@@ -254,7 +254,7 @@ unsigned char * WINAPI NdrInterfacePointerMarshall(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment