[git] GpgOL - branch, master, updated. gpgol-2.3.2-4-ge8c7a52

by Andre Heinecke cvs at cvs.gnupg.org
Mon Nov 19 11:06:21 CET 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG extension for MS Outlook".

The branch, master has been updated
       via  e8c7a5285420acd86ac97143747b78b6934151b3 (commit)
       via  e6e29900ce0e9c0db681ac89c708f13415399905 (commit)
      from  287eaa69c04c8fbbf6f135c3f23f78cf15e77a9e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e8c7a5285420acd86ac97143747b78b6934151b3
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Mon Nov 19 11:05:16 2018 +0100

    Initalize pointer in mapi_get_header
    
    * src/mapihelp.cpp (mapi_get_header): Initialize stream.
    
    --
    This would probably have avoided:
    
    GnuPG-Bug-Id: T4262

diff --git a/src/mapihelp.cpp b/src/mapihelp.cpp
index f259b98..4a1d532 100644
--- a/src/mapihelp.cpp
+++ b/src/mapihelp.cpp
@@ -493,7 +493,7 @@ mapi_get_header (LPMESSAGE message)
 {
   TSTART;
   HRESULT hr;
-  LPSTREAM stream;
+  LPSTREAM stream = nullptr;
   ULONG bRead;
   std::string ret;
 

commit e6e29900ce0e9c0db681ac89c708f13415399905
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Mon Nov 19 10:58:20 2018 +0100

    Check for error in dbg decrated oom funcs
    
    * src/oomhelp.cpp (gpgol_openProperty, gpgol_queryInterface):
    Check result before calling memdbg_addRef.
    
    --
    Calling something on the pointer on error is undefined
    so we may not do it. memdbg_addRef tries to get the
    name of the interface. That might then crash.
    Usually the returned pointer should be NULL so
    on error so it does not happen much.
    
    GnuPG-Bug-Id: T4262

diff --git a/src/oomhelp.cpp b/src/oomhelp.cpp
index 205eec5..bef4170 100644
--- a/src/oomhelp.cpp
+++ b/src/oomhelp.cpp
@@ -41,7 +41,12 @@ HRESULT
 gpgol_queryInterface (LPUNKNOWN pObj, REFIID riid, LPVOID FAR *ppvObj)
 {
   HRESULT ret = pObj->QueryInterface (riid, ppvObj);
-  if ((opt.enable_debug & DBG_MEMORY) && *ppvObj)
+  if (ret)
+    {
+      log_debug ("%s:%s: QueryInterface failed hr=%#lx",
+                 SRCNAME, __func__, ret);
+    }
+  else if ((opt.enable_debug & DBG_MEMORY) && *ppvObj)
     {
       memdbg_addRef (*ppvObj);
     }
@@ -56,7 +61,12 @@ gpgol_openProperty (LPMAPIPROP obj, ULONG ulPropTag, LPCIID lpiid,
   HRESULT ret = obj->OpenProperty (ulPropTag, lpiid,
                                    ulInterfaceOptions, ulFlags,
                                    lppUnk);
-  if ((opt.enable_debug & DBG_MEMORY) && *lppUnk)
+  if (ret)
+    {
+      log_debug ("%s:%s: OpenProperty failed hr=%#lx",
+                 SRCNAME, __func__, ret);
+    }
+  else if ((opt.enable_debug & DBG_MEMORY) && *lppUnk)
     {
       memdbg_addRef (*lppUnk);
       log_debug ("%s:%s: OpenProperty on %p prop %lx result %p",

-----------------------------------------------------------------------

Summary of changes:
 src/mapihelp.cpp |  2 +-
 src/oomhelp.cpp  | 14 ++++++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GnuPG extension for MS Outlook
http://git.gnupg.org




More information about the Gnupg-commits mailing list