oleaut32: Check a return value (Coverity).
This commit is contained in:
parent
653354ab25
commit
0f86ae37c6
@ -1070,15 +1070,16 @@ unsigned char * WINAPI LPSAFEARRAY_UserUnmarshal(ULONG *pFlags, unsigned char *B
|
|||||||
Buffer += sizeof(wiresab[0]) * wiresa->cDims;
|
Buffer += sizeof(wiresab[0]) * wiresa->cDims;
|
||||||
|
|
||||||
if(vt)
|
if(vt)
|
||||||
|
{
|
||||||
*ppsa = SafeArrayCreateEx(vt, wiresa->cDims, wiresab, NULL);
|
*ppsa = SafeArrayCreateEx(vt, wiresa->cDims, wiresab, NULL);
|
||||||
|
if (!*ppsa) RpcRaiseException(E_OUTOFMEMORY);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SafeArrayAllocDescriptor(wiresa->cDims, ppsa);
|
if (FAILED(SafeArrayAllocDescriptor(wiresa->cDims, ppsa)))
|
||||||
if(*ppsa)
|
RpcRaiseException(E_OUTOFMEMORY);
|
||||||
memcpy((*ppsa)->rgsabound, wiresab, sizeof(SAFEARRAYBOUND) * wiresa->cDims);
|
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
|
/* be careful about which flags we set since they could be a security
|
||||||
* risk */
|
* risk */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user