Module: wine
Branch: refs/heads/master
Commit: 582e2f1ff84f1069a10f031e53236285d4f6c310
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=582e2f1ff84f1069a10f031…
Author: Robert Shearman <rob(a)codeweavers.com>
Date: Fri Apr 7 11:18:05 2006 +0100
ole32: Fix DefaultHandler_EnumAdvises.
As per MSDN, if the object has no connections then
IOleObject::EnumAdvises should return a NULL enumerator and S_OK. This
is the case when This->oleAdviseHolder is NULL, so do this and avert a
potential NULL dereference of This->oleAdviseHolder (found by
Coverity).
---
dlls/ole32/defaulthandler.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/ole32/defaulthandler.c b/dlls/ole32/defaulthandler.c
index e2eaf58..e3a2e64 100644
--- a/dlls/ole32/defaulthandler.c
+++ b/dlls/ole32/defaulthandler.c
@@ -838,10 +838,9 @@ static HRESULT WINAPI DefaultHandler_Enu
*ppenumAdvise = NULL;
if (!This->oleAdviseHolder)
- return IOleAdviseHolder_EnumAdvise(This->oleAdviseHolder,
- ppenumAdvise);
+ return S_OK;
- return S_OK;
+ return IOleAdviseHolder_EnumAdvise(This->oleAdviseHolder, ppenumAdvise);
}
/************************************************************************
Module: wine
Branch: refs/heads/master
Commit: cca69647a3ce7ac471431c22c17570519f213a94
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=cca69647a3ce7ac471431c2…
Author: Robert Shearman <rob(a)codeweavers.com>
Date: Fri Apr 7 11:17:43 2006 +0100
oleaut32: Fix typo in LPSAFEARRAY_Unmarshal.
Fix typo in LPSAFEARRAY_Unmarshal where the check for the failure of
the SafeArrayCreateEx call was missing a dereference operator (found
by Coverity).
---
dlls/oleaut32/usrmarshal.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/oleaut32/usrmarshal.c b/dlls/oleaut32/usrmarshal.c
index 242c3b1..961304f 100644
--- a/dlls/oleaut32/usrmarshal.c
+++ b/dlls/oleaut32/usrmarshal.c
@@ -852,7 +852,7 @@ unsigned char * WINAPI LPSAFEARRAY_UserU
Buffer += sizeof(wiresab[0]) * wiresa->cDims;
*ppsa = SafeArrayCreateEx(vt, wiresa->cDims, wiresab, NULL);
- if (!ppsa)
+ if (!*ppsa)
RpcRaiseException(E_OUTOFMEMORY);
/* be careful about which flags we set since they could be a security