[git] GpgOL - branch, master, updated. gpgol-1.1.3-50-ga81d689

by Andre Heinecke cvs at cvs.gnupg.org
Fri Aug 2 12:28:36 CEST 2013


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  a81d6897e302fa0fceb73647d41ee27370bf1a57 (commit)
       via  8a668dc4eb5e6451f09dccfa4981db0c17d648dc (commit)
      from  1a9124f08d88a4549623b45146870fe7125ab60d (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 a81d6897e302fa0fceb73647d41ee27370bf1a57
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Aug 2 09:57:03 2013 +0000

    Fix possible crash in encryptInspector
    
        The recipientAddr pointer got moved to an invalid location
        before free.
    
        * src/ribbons-callbacks.cpp (encryptInspector): Fix free of
        recipients.
    
    --
        Thats what you get when you let Python / Java coders write C

diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index adf24f1..0afead1 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -93,6 +93,8 @@ encryptInspector (LPDISPATCH ctrl, int flags)
   int i;
   STATSTG tmpStat;
 
+  log_debug ("%s:%s: enter", SRCNAME, __func__);
+
   hr = getContext (ctrl, &context);
   if (FAILED(hr))
       return hr;
@@ -328,11 +330,13 @@ failure:
   RELDISP(tmpstream);
   xfree (plaintext);
   xfree (senderAddr);
-  while (recipientAddrs && *recipientAddrs)
-  {
-    xfree (*recipientAddrs++);
-  }
-  xfree (recipientAddrs);
+  if (recipientAddrs)
+    {
+      for (i=0; recipientAddrs && recipientAddrs[i]; i++)
+        xfree (recipientAddrs[i]);
+      xfree (recipientAddrs);
+    }
+  log_debug ("%s:%s: leave", SRCNAME, __func__);
 
   return S_OK;
 }

commit 8a668dc4eb5e6451f09dccfa4981db0c17d648dc
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Aug 2 09:55:51 2013 +0000

    Add some more initalization also for encryption
    
        * src/ribbon-callbacks.cpp (encryptInspector): Initialize
        dispatcher pointers

diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index 529cdf2..adf24f1 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -69,12 +69,12 @@ HRESULT
 encryptInspector (LPDISPATCH ctrl, int flags)
 {
   LPDISPATCH context = NULL;
-  LPDISPATCH selection;
-  LPDISPATCH wordEditor;
-  LPDISPATCH application;
-  LPDISPATCH mailItem;
-  LPDISPATCH sender;
-  LPDISPATCH recipients;
+  LPDISPATCH selection = NULL;
+  LPDISPATCH wordEditor = NULL;
+  LPDISPATCH application = NULL;
+  LPDISPATCH mailItem = NULL;
+  LPDISPATCH sender = NULL;
+  LPDISPATCH recipients = NULL;
 
   struct sink_s encsinkmem;
   sink_t encsink = &encsinkmem;

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

Summary of changes:
 src/ribbon-callbacks.cpp |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)


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




More information about the Gnupg-commits mailing list