Commit d98b73a1 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

rpcrt4: Clear an object pointer during unmarshaling, otherwise we

could end up using the previously allocated memory even if it isn't the right size, causing heap corruption.
parent 578df90d
......@@ -842,7 +842,10 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
pointer_id = NDR_LOCAL_UINT32_READ(Buffer);
TRACE("pointer_id is 0x%08lx\n", pointer_id);
if (!fMustAlloc && *pPointer)
{
FIXME("free object pointer %p\n", *pPointer);
*pPointer = NULL;
}
if (pointer_id)
pointer_needs_unmarshaling = 1;
else
......
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