Commit 0f86ae37 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

oleaut32: Check a return value (Coverity).

parent 653354ab
......@@ -1070,15 +1070,16 @@ unsigned char * WINAPI LPSAFEARRAY_UserUnmarshal(ULONG *pFlags, unsigned char *B
Buffer += sizeof(wiresab[0]) * wiresa->cDims;
if(vt)
{
*ppsa = SafeArrayCreateEx(vt, wiresa->cDims, wiresab, NULL);
if (!*ppsa) RpcRaiseException(E_OUTOFMEMORY);
}
else
{
SafeArrayAllocDescriptor(wiresa->cDims, ppsa);
if(*ppsa)
memcpy((*ppsa)->rgsabound, wiresab, sizeof(SAFEARRAYBOUND) * wiresa->cDims);
if (FAILED(SafeArrayAllocDescriptor(wiresa->cDims, ppsa)))
RpcRaiseException(E_OUTOFMEMORY);
memcpy((*ppsa)->rgsabound, wiresab, sizeof(SAFEARRAYBOUND) * wiresa->cDims);
}
if (!*ppsa)
RpcRaiseException(E_OUTOFMEMORY);
/* be careful about which flags we set since they could be a security
* risk */
......
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