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.
This commit is contained in:
Robert Shearman 2006-06-09 17:29:28 +01:00 committed by Alexandre Julliard
parent 578df90d6d
commit d98b73a17a

View File

@ -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