[git] GPG-ERROR - branch, master, updated. gpgrt-1.28-3-g791177d

by Werner Koch cvs at cvs.gnupg.org
Sun Mar 18 17:47:14 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 "Error codes used by GnuPG et al.".

The branch, master has been updated
       via  791177de023574223eddf7288eb7c5a0721ac623 (commit)
      from  c36a60687976d98b54dac17f699dfca4918a737c (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 791177de023574223eddf7288eb7c5a0721ac623
Author: Werner Koch <wk at gnupg.org>
Date:   Sun Mar 18 17:39:43 2018 +0100

    core: Fix regression on arm64 due to invalid use of va_list.
    
    * src/logging.c (_gpgrt_log_printhex): Provide a dummy arg instead of
    NULL.
    --
    
    Fix
    Suggested-by: Jakub Wilk <jwilk at jwilk.net>
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/src/logging.c b/src/logging.c
index 1a4f620..d01f974 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -1090,9 +1090,10 @@ _gpgrt_log_flush (void)
 
 
 /* Print a hexdump of (BUFFER,LENGTH).  With FMT passed as NULL print
- * just the raw dump, with FMT being an empty string, print a trailing
- * linefeed, otherwise print an entire debug line with the expanded
- * FMT followed by a possible wrapped hexdump and a final LF.  */
+ * just the raw dump (in this case ARG_PTR is not used), with FMT
+ * being an empty string, print a trailing linefeed, otherwise print
+ * an entire debug line with the expanded FMT followed by a possible
+ * wrapped hexdump and a final LF.  */
 void
 _gpgrt_logv_printhex (const void *buffer, size_t length,
                       const char *fmt, va_list arg_ptr)
@@ -1150,7 +1151,16 @@ _gpgrt_log_printhex (const void *buffer, size_t length,
       va_end (arg_ptr);
     }
   else
-    _gpgrt_logv_printhex (buffer, length, NULL, NULL);
+    {
+      /* va_list is not necessary a pointer and thus we can't use NULL
+       * because that would conflict with platforms using a straight
+       * struct for it (e.g. arm64).  We use a dummy variable instead;
+       * the static is a simple way zero it out so to not get
+       * complains about uninitialized use.  */
+      static va_list dummy_argptr;
+
+      _gpgrt_logv_printhex (buffer, length, NULL, dummy_argptr);
+    }
 }
 
 

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

Summary of changes:
 src/logging.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Error codes used by GnuPG et al.
http://git.gnupg.org




More information about the Gnupg-commits mailing list