[git] GpgOL - branch, master, updated. gpgol-2.3.1-19-ge193d2e

by Andre Heinecke cvs at cvs.gnupg.org
Mon Oct 29 11:57:11 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  e193d2e3c721a3ab92d3479ddc7d59039265d682 (commit)
       via  ec09bad3291af901eb7c773739aab3f22cda3197 (commit)
      from  e60a442820182e4a6958f374c4de5a661551107d (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 e193d2e3c721a3ab92d3479ddc7d59039265d682
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Mon Oct 29 11:53:27 2018 +0100

    Initialize memory to X on trace + memdbg
    
    * src/xmalloc.h (xmalloc): Initialize memory to X on debug
    level.
    
    --
    This is intended to better find memory errors.

diff --git a/src/xmalloc.h b/src/xmalloc.h
index e302a85..f2cf877 100644
--- a/src/xmalloc.h
+++ b/src/xmalloc.h
@@ -33,6 +33,8 @@ extern "C" {
   if ((opt.enable_debug & DBG_MEMORY)) \
   { \
     memdbg_alloc (retval); \
+    if ((opt.enable_debug & DBG_TRACE)) \
+      memset (retval, 'X', VAR1); \
   } \
 retval;})
 

commit ec09bad3291af901eb7c773739aab3f22cda3197
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Mon Oct 29 11:52:23 2018 +0100

    Fix off by one in iconv_to_utf8
    
    * src/mlang-charset.cpp (iconv_to_utf8): Inlen needed
    to include the zero.
    
    --
    This fixes a crash when this function is used for conversion.

diff --git a/src/mlang-charset.cpp b/src/mlang-charset.cpp
index c4cd1fa..65386d1 100644
--- a/src/mlang-charset.cpp
+++ b/src/mlang-charset.cpp
@@ -35,7 +35,7 @@ DEFINE_GUID (IID_IMultiLanguage, 0x275c23e1,0x3747,0x11d0,0x9f,
 #include "mlang-charset.h"
 
 static char *
-iconv_to_utf8 (const char *charset, const char *input, size_t inlen)
+iconv_to_utf8 (const char *charset, const char *input)
 {
   if (!charset || !input)
     {
@@ -63,6 +63,7 @@ iconv_to_utf8 (const char *charset, const char *input, size_t inlen)
     }
 
   char *buffer = (char*) xmalloc (len + 1);
+  size_t inlen = strlen (input) + 1; // Need to add 1 for the zero
   char *outptr = buffer;
   size_t outbytes = len;
   size_t ret = gpgrt_w32_iconv (ctx, (const char **)&input, &inlen,
@@ -143,7 +144,7 @@ char *ansi_charset_to_utf8 (const char *charset, const char *input,
                      SRCNAME, __func__, charset);
           /* We only use this as a fallback as the old code was older and
              known to work in most cases. */
-          ret = iconv_to_utf8 (charset, input, inlen);
+          ret = iconv_to_utf8 (charset, input);
           if (ret)
             {
               return ret;

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

Summary of changes:
 src/mlang-charset.cpp | 5 +++--
 src/xmalloc.h         | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)


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




More information about the Gnupg-commits mailing list