[git] GpgOL - branch, master, updated. gpgol-2.3.1-4-g2aa65cb

[email protected] (by Andre Heinecke)
Newsgroups gmane.comp.encryption.gpg.cvs
Message-ID <[email protected]>
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  2aa65cb3d86d0e8eee79db1ec72447707cd4a2f2 (commit)
      from  1f378c00bda53cec3057ef27684b671293cc21ac (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 2aa65cb3d86d0e8eee79db1ec72447707cd4a2f2
Author: Andre Heinecke <[email protected]>
Date:   Mon Oct 22 12:13:48 2018 +0200

    Fix check for debug levels for string debug
    
    * src/w32-gettext.h (wchar_to_utf8, utf8_to_wchar): Fix enable_debug
    check.
    
    --
    The broken logic caused the string debugging to be active if one
    of the debug levels required was enabled. This caused data
    leak even if debug data was disabled.
    
    GnuPG-Bug-Id: T4193

diff --git a/src/w32-gettext.h b/src/w32-gettext.h
index e8547d3..4dfe40c 100644
--- a/src/w32-gettext.h
+++ b/src/w32-gettext.h
@@ -73,7 +73,9 @@ char *native_to_utf8 (const char *string);
 
 #define utf8_to_wchar(VAR1) ({wchar_t *retval; \
   retval = _utf8_to_wchar (VAR1); \
-  if ((opt.enable_debug & (DBG_TRACE | DBG_DATA | DBG_MEMORY))) \
+  if ((opt.enable_debug & DBG_TRACE) && \
+      (opt.enable_debug & DBG_DATA) && \
+      (opt.enable_debug & DBG_MEMORY)) \
   { \
     log_debug ("%s:%s:%i wchar_t alloc %p:%S", \
                SRCNAME, __func__, __LINE__, retval, retval); \
@@ -82,7 +84,9 @@ retval;})
 
 #define wchar_to_utf8(VAR1) ({char *retval; \
   retval = _wchar_to_utf8 (VAR1); \
-  if ((opt.enable_debug & (DBG_TRACE | DBG_DATA | DBG_MEMORY))) \
+  if ((opt.enable_debug & DBG_TRACE) && \
+      (opt.enable_debug & DBG_DATA) && \
+      (opt.enable_debug & DBG_MEMORY)) \
   { \
     log_debug ("%s:%s:%i char utf8 alloc %p:%s", \
                SRCNAME, __func__, __LINE__, retval, retval); \

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

Summary of changes:
 src/w32-gettext.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GnuPG extension for MS Outlook
http://git.gnupg.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.