[git] GpgOL - branch, master, updated. gpgol-1.3.0-3-geb8f1fb

by Andre Heinecke cvs at cvs.gnupg.org
Fri Nov 27 15:37:44 CET 2015


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  eb8f1fbb6af9f9114e718c5ceaf4b62662fccc45 (commit)
       via  85bd4e17ec6c4ce79f55090d3647489ef9b5ec72 (commit)
      from  e287529cc4e5fc96538a7684c925d11da6640f3c (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 eb8f1fbb6af9f9114e718c5ceaf4b62662fccc45
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Nov 27 15:34:10 2015 +0100

    Generate libmapi32 for 64 bit systems corecctly
    
    * configure.ac: Add conditional for 64 bit build
    * src/Makefile.am: Add 64 bit flags for dlltool if necessary.
    * src/mapi32.def: Add C calling convention names where necessary.

diff --git a/configure.ac b/configure.ac
index c1daef2..06d7fd1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,7 +157,7 @@ if test "$have_w32_system" = yes; then
 fi
 AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
 
-
+AM_CONDITIONAL(BUILD_W64, test "$host" = "x86_64-w64-mingw32")
 
 #
 # Checks for libraries.
diff --git a/src/Makefile.am b/src/Makefile.am
index d830d36..cc0aea8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -97,8 +97,12 @@ gpgol_SOURCES = \
 # them).
 gpgol_DEPENDENCIES = libmapi32.a libgpg-error.a libgpgme.a libassuan.a
 
+if BUILD_W64
+  DLLTOOLFLAGS64=--as-flags=--64 -m i386:x86-64
+endif
+
 libmapi32.a: mapi32.def
-	$(DLLTOOL) --output-lib $@ --def $<
+	$(DLLTOOL) $(DLLTOOLFLAGS64) --output-lib $@ --def $<
 
 libgpg-error.a:
 	ln -s $$($(GPG_ERROR_CONFIG) --prefix)/lib/libgpg-error.a .
diff --git a/src/mapi32.def b/src/mapi32.def
index 2e4fe42..00c9e12 100644
--- a/src/mapi32.def
+++ b/src/mapi32.def
@@ -29,6 +29,7 @@ FPropCompareProp at 12
 FPropContainsProp at 12
 FPropExists at 8
 FreePadrlist at 4
+FreeProws
 FreeProws at 4
 FtAdcFt at 20
 FtAddFt at 16
@@ -51,9 +52,12 @@ HrDecomposeEID at 28
 HrDecomposeMsgID at 24
 HrDispatchNotifications at 4
 HrEntryIDFromSz at 12
+HrGetOneProp
 HrGetOneProp at 12
 HrIStorageFromStream at 16
+HrQueryAllRows
 HrQueryAllRows at 24
+HrSetOneProp
 HrSetOneProp at 8
 HrSzFromEntryID at 12
 HrThisThreadAdviseSink at 8
@@ -155,6 +159,7 @@ UNKOBJ_ScSzFromIdsAlloc at 20
 UlAddRef at 4
 UlFromSzHex at 4
 UlPropSize at 4
+UlRelease
 UlRelease at 4
 WrapCompressedRTFStream
 WrapCompressedRTFStream at 12

commit 85bd4e17ec6c4ce79f55090d3647489ef9b5ec72
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Nov 27 15:26:42 2015 +0100

    Fix size_t / unsigned int conversion for x64
    
    * src/mlang-charset.cpp (ansi_charset_to_utf8): Fix call to
     ConvertStringToUnicode to use unsigned int for size.

diff --git a/src/mlang-charset.cpp b/src/mlang-charset.cpp
index 221f57f..3c71d1d 100644
--- a/src/mlang-charset.cpp
+++ b/src/mlang-charset.cpp
@@ -37,7 +37,8 @@ char *ansi_charset_to_utf8 (const char *charset, char *input,
   HRESULT err;
   DWORD enc;
   DWORD mode = 0;
-  unsigned int wlen = 0;
+  unsigned int wlen = 0,
+               uinlen = 0;
   wchar_t *buf;
   char *ret;
 
@@ -51,6 +52,15 @@ char *ansi_charset_to_utf8 (const char *charset, char *input,
       return NULL;
     }
 
+  if (inlen > UINT_MAX)
+    {
+      log_error ("%s:%s: Inlen too long. Bug.",
+                 SRCNAME, __func__);
+      multilang->Release();
+      return NULL;
+    }
+
+  uinlen = (unsigned int) inlen;
 
   mime_info.uiCodePage = 0;
   mime_info.uiInternetEncoding = 0;
@@ -69,7 +79,7 @@ char *ansi_charset_to_utf8 (const char *charset, char *input,
 
   /** Get the size of the result */
   err = multilang->ConvertStringToUnicode(&mode, enc, input,
-                                          &inlen, NULL, &wlen);
+                                          &uinlen, NULL, &wlen);
   if (FAILED (err))
     {
       log_error ("%s:%s: Failed conversion.",
@@ -79,7 +89,7 @@ char *ansi_charset_to_utf8 (const char *charset, char *input,
   }
   buf = (wchar_t*) xmalloc(sizeof(wchar_t) * (wlen + 1));
 
-  err = multilang->ConvertStringToUnicode(&mode, enc, input, &inlen,
+  err = multilang->ConvertStringToUnicode(&mode, enc, input, &uinlen,
                                           buf, &wlen);
   multilang->Release ();
   if (FAILED (err))

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

Summary of changes:
 configure.ac          |  2 +-
 src/Makefile.am       |  6 +++++-
 src/mapi32.def        |  5 +++++
 src/mlang-charset.cpp | 16 +++++++++++++---
 4 files changed, 24 insertions(+), 5 deletions(-)


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




More information about the Gnupg-commits mailing list