Regression: tests failing on Solaris 10 for >= 2.0.23

Werner Koch wk at gnupg.org
Thu Aug 14 20:01:00 CEST 2014


Hi!

It might be that you are running an older version of gpg-agent which
does not implement AGENT_ID and in this case the debug code might be
triggered with a NULL for the text value.
 
Can you please try the patch for libassuan below.

However, I doubt that this is the reason for Solaris because I assume
that printf ("%s", NULL) does not bail out on there but I am not sure.
The AIX man page explictly remarks that it is undefined (as stated by
Posix).  Time to move our own printf code from GnuPG to libgpg-error and
have libassuan et al use that code too.  And we have the guarantee that
"%zu" and such work.


Salam-Shalom,

   Werner


---
>From d081ab69a6d726528d0ea1ba88736a76fce99950 Mon Sep 17 00:00:00 2001
From: Werner Koch <wk at gnupg.org>
Date: Thu, 14 Aug 2014 17:15:04 +0200
Subject: [PATCH] Fix possible segv in a call to _assuan_debug.

* src/context.c (assuan_set_error): Do not pass NULL for %s in the
trace function.
---
 src/context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/context.c b/src/context.c
index b4d4d49..62b7f57 100644
--- a/src/context.c
+++ b/src/context.c
@@ -190,7 +190,7 @@ assuan_set_error (assuan_context_t ctx, gpg_error_t err, const char *text)
 {
   TRACE4 (ctx, ASSUAN_LOG_CTX, "assuan_set_error", ctx,
          "err=%i (%s,%s),text=%s", err, gpg_strsource (err),
-         gpg_strerror (err), text);
+         gpg_strerror (err), text?text:"(none)");
 
   ctx->err_no = err;
   ctx->err_str = text;
-- 
1.8.4.3

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-devel mailing list