Seen with gcc-4.4.5 and -Wformat -Wformat-security
Signed-off-by: Gilles Espinasse
---
options.c |6 +++---
push.c|4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/options.c b/options.c
index 5f1efc5..208db30 100644
--- a/options.c
+++ b/options.c
@@ -4002,7 +4002,7 @@ add_option (struct options *options,
{
if (options->inetd != -1)
{
- msg (msglevel, opterr);
+ msg (msglevel, "%s", opterr);
goto err;
}
else
@@ -4012,7 +4012,7 @@ add_option (struct options *options,
{
if (options->inetd != -1)
{
- msg (msglevel, opterr);
+ msg (msglevel, "%s", opterr);
goto err;
}
else
@@ -4022,7 +4022,7 @@ add_option (struct options *options,
{
if (name != NULL)
{
- msg (msglevel, opterr);
+ msg (msglevel, "%s", opterr);
goto err;
}
name = p[z];
diff --git a/push.c b/push.c
index 9ddc900..86ac4a7 100644
--- a/push.c
+++ b/push.c
@@ -178,7 +178,7 @@ send_push_reply (struct context *c)
const int extra = 64; /* extra space for possible trailing ifconfig and
push-continuation */
const int safe_cap = BCAP () - extra;
- buf_printf (, cmd);
+ buf_printf (, "%s", cmd);
while (e)
{
@@ -194,7 +194,7 @@ send_push_reply (struct context *c)
goto fail;
multi_push = true;
buf_reset_len ();
- buf_printf (, cmd);
+ buf_printf (, "%s", cmd);
}
}
if (BLEN () + l >= safe_cap)
--
1.7.3.4