Hi Sergey!

El dg. 02 de 03 de 2025 a les 14:35 +0100, en/na Sergey Poznyakoff va
escriure:
> Did it help? Do you have any workaround for this?

Oh, I had dropped the ball, so thanks for your reminder.

Indeed it helped! I couldn't believe my eyes when I saw your analysis.
Before confidently stating that "Debian has nothing special with it", I
had actually grepped the patches Debian applies to libtool, and there
was nothing relevant. It turns out the maintainer was hardcoding the
version and serial numbers during via variables in the build, and
forgot to update them for the 2.4.7 → 2.5.3 upgrade. Sorry for the
oversight!

I filed https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1099559 last
night, which will be fixed soon, and in the interim, I just dropped
LT_PREREQ temporarily, as I know for sure it will be built with 2.5.3
in Debian.

With that out of the way, I applied the attached patch to fix a build
failure with -Werror=format-security. Please review if the format
argument is correct for delim.

Thanks a lot, 3.18 is now on its way to unstable.

-- 
Jordi Mallach <jo...@mallach.net>
From 8f056913ddd5efecf87aabb9ddbadabb1d2b15ac Mon Sep 17 00:00:00 2001
From: Jordi Mallach <jo...@mallach.net>
Date: Wed, 5 Mar 2025 12:13:06 +0100
Subject: [PATCH] Fix missing format arguments for builds with
 -Wformat-security

libmailutils/diag/debug.c (mu_debug_format_spec): Add missing "%s" to
printf to avoid triggering -Wformat-security.
---
 libmailutils/diag/debug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libmailutils/diag/debug.c b/libmailutils/diag/debug.c
index 2a1b52eba..84c921abb 100644
--- a/libmailutils/diag/debug.c
+++ b/libmailutils/diag/debug.c
@@ -511,7 +511,7 @@ mu_debug_format_spec (mu_stream_t str, const char *names, int flags)
 	{
 	  if (delim)
 	    {
-	      rc = mu_stream_printf (str, delim);
+	      rc = mu_stream_printf (str, "%s", delim);
 	      if (rc)
 		break;
 	    }
@@ -564,7 +564,7 @@ mu_debug_format_spec (mu_stream_t str, const char *names, int flags)
 	{
 	  if (delim)
 	    {
-	      rc = mu_stream_printf (str, delim);
+	      rc = mu_stream_printf (str, "%s", delim);
 	      if (rc)
 		break;
 	    }
-- 
2.47.2

Reply via email to