Commit 8620d15d authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

rpcrt4: Unmarshal NULL OLE interfaces properly by handling the case of a 0 stream size.

parent 2b552486
......@@ -288,12 +288,14 @@ unsigned char * WINAPI NdrInterfacePointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg
*(LPVOID*)ppMemory = NULL;
if (pStubMsg->Buffer + sizeof(DWORD) < (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength) {
stream = RpcStream_Create(pStubMsg, FALSE);
if (stream) {
if (!stream) RpcRaiseException(E_OUTOFMEMORY);
if (*((RpcStreamImpl *)stream)->size != 0)
hr = COM_UnmarshalInterface(stream, &IID_NULL, (LPVOID*)ppMemory);
IStream_Release(stream);
if (FAILED(hr))
else
hr = S_OK;
IStream_Release(stream);
if (FAILED(hr))
RpcRaiseException(hr);
}
}
return NULL;
}
......
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