[git] GpgOL - branch, master, updated. gpgol-2.0.1-10-g8733e4d

by Andre Heinecke cvs at cvs.gnupg.org
Wed Nov 15 14:37:39 CET 2017


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  8733e4d426bb9cdb8cce1db3e4ca67b656b27710 (commit)
      from  74cf5f10861c8a6acc3abab4e5b0befc6a8ef791 (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 8733e4d426bb9cdb8cce1db3e4ca67b656b27710
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Nov 15 14:34:25 2017 +0100

    Workaround crash when accessing CurrentView
    
    * src/explorer-events.cpp (EVENT_SINK_INVOKE),
    src/ribbon-callbacks.cpp (get_mail_from_control): Use
    preview pane instead.
    
    --
    Somehow latest Outlook 2016 crashes when accessing the current view
    of the Explorer. This is even reproducible with
    GpgOL disabled and only with Outlook Spy active. If you select
    the explorer of an Outlook.com resource and then access
    the CurrentView and close the CurrentView again in Outlook Spy
    outlook crashes.
    
    GnuPG-Bug-Id: T3484

diff --git a/src/explorer-events.cpp b/src/explorer-events.cpp
index ed599ef..2e457ab 100644
--- a/src/explorer-events.cpp
+++ b/src/explorer-events.cpp
@@ -82,6 +82,13 @@ EVENT_SINK_INVOKE(ExplorerEvents)
         {
           log_oom_extra ("%s:%s: Selection change in explorer: %p",
                          SRCNAME, __func__, this);
+#if 0
+          This is fragile. Somehow. Accessing the current view of the
+          Explorer might crash outlook. This is even reproducable with
+          GpgOL enabled and only with Outlook Spy. If you select
+          the explorer of an Outlook.com resource and then access
+          the CurrentView and close the CurrentView again outlook crashes.
+
           LPDISPATCH tableView = get_oom_object (m_object, "CurrentView");
           if (!tableView)
             {
@@ -94,6 +101,14 @@ EVENT_SINK_INVOKE(ExplorerEvents)
             {
               break;
             }
+#else
+          LPDISPATCH prevEdit = get_oom_object (m_object, "PreviewPane.WordEditor");
+          gpgol_release (prevEdit);
+          if (!prevEdit)
+            {
+              break;
+            }
+#endif
           HANDLE thread = CreateThread (NULL, 0, invalidate_ui, (LPVOID) this, 0,
                                         NULL);
 
diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index 4e69d8e..c2a78d1 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -1468,26 +1468,14 @@ get_mail_from_control (LPDISPATCH ctrl, bool *none_selected)
           // Avoid showing wrong crypto state if we don't have a reading
           // pane. In that case the parser will finish for a mail which is gone
           // and the crypto state will not get updated.
-          LPDISPATCH tableView = get_oom_object (context, "CurrentView");
-          if (!tableView)
+          LPDISPATCH prevEdit = get_oom_object (context, "PreviewPane.WordEditor");
+          gpgol_release (prevEdit);
+          if (!prevEdit)
             {
-              // Woops, should not happen.
-              TRACEPOINT;
               *none_selected = true;
               gpgol_release (mailitem);
               mailitem = nullptr;
             }
-          else
-            {
-              int hasReadingPane = get_oom_bool (tableView, "ShowReadingPane");
-              gpgol_release (tableView);
-              if (!hasReadingPane)
-                {
-                  *none_selected = true;
-                  gpgol_release (mailitem);
-                  mailitem = nullptr;
-                }
-            }
         }
     }
 

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

Summary of changes:
 src/explorer-events.cpp  | 15 +++++++++++++++
 src/ribbon-callbacks.cpp | 18 +++---------------
 2 files changed, 18 insertions(+), 15 deletions(-)


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




More information about the Gnupg-commits mailing list