From: Vadim Zeitlin Date: Thu, 17 Dec 2009 10:52:02 +0000 (+0000) Subject: Initialize all fields of EXCEPINFO object to avoid crashes later. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c50ab33de612877bdb803b2e1abfa4d7f60758ea Initialize all fields of EXCEPINFO object to avoid crashes later. We could call SysFreeString() on uninitialized pointers if IDispatch::Invoke() failed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index 127b52b527..774d15476f 100644 --- a/src/msw/ole/automtn.cpp +++ b/src/msw/ole/automtn.cpp @@ -139,7 +139,6 @@ bool wxAutomationObject::Invoke(const wxString& member, int action, HRESULT hr; DISPPARAMS dispparams; unsigned int uiArgErr; - EXCEPINFO excep; // Get the IDs for the member and its arguments. GetIDsOfNames expects the // member name as the first name, followed by argument names (if any). @@ -181,7 +180,8 @@ bool wxAutomationObject::Invoke(const wxString& member, int action, dispparams.cArgs = noArgs; dispparams.cNamedArgs = namedArgCount; - excep.pfnDeferredFillIn = NULL; + EXCEPINFO excep; + wxZeroMemory(excep); hr = ((IDispatch*)m_dispatchPtr)->Invoke(dispIds[0], IID_NULL, LOCALE_SYSTEM_DEFAULT, (WORD)action, &dispparams, vReturnPtr, &excep, &uiArgErr);