net-mail/mailutils: fix -Wformat-security

Closes: https://bugs.gentoo.org/953393
Signed-off-by: Eray Aslan <eras@gentoo.org>
This commit is contained in:
Eray Aslan
2025-04-25 08:49:15 +02:00
parent 4690e5008f
commit 53b9b6aba4
2 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
From 9379ec9e25ae6bdbd3d6f5ef9930ac2176d2efe7 Mon Sep 17 00:00:00 2001
From: Jordi Mallach <jordi@mallach.net>
Date: Wed, 5 Mar 2025 12:13:06 +0100
Subject: 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 2a1b52e..84c921a 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;
}
--
cgit v1.1

View File

@@ -63,6 +63,7 @@ REQUIRED_USE="
DOCS=( ABOUT-NLS AUTHORS COPYING COPYING.LESSER ChangeLog INSTALL NEWS README THANKS TODO )
PATCHES=(
"${FILESDIR}"/${PN}-3.5-add-include.patch
"${FILESDIR}"/${PN}-3.19-format-security.patch
)
pkg_setup() {