commit cd2b10b: [Minor] Fix format string
Vsevolod Stakhov
vsevolod at highsecure.ru
Wed Jan 5 17:07:04 UTC 2022
Author: Vsevolod Stakhov
Date: 2022-01-05 17:02:39 +0000
URL: https://github.com/rspamd/rspamd/commit/cd2b10baed3c84a88c22573087f7c055eb04e46a (HEAD -> master)
[Minor] Fix format string
---
src/libmime/mime_expressions.c | 6 +++---
src/libserver/dkim.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c
index 1fc445c81..0961195a2 100644
--- a/src/libmime/mime_expressions.c
+++ b/src/libmime/mime_expressions.c
@@ -784,7 +784,7 @@ rspamd_mime_expr_parse (const gchar *line, gsize len,
case bad_atom:
g_set_error (err, rspamd_mime_expr_quark(), 100, "cannot parse"
" mime atom '%s' when reading symbol '%c' at offset %d, "
- "near %*.s", line, t, (gint)(p - line),
+ "near %.*s", line, t, (gint)(p - line),
(gint)MIN (end - p, 10), p);
return NULL;
case end_atom:
@@ -966,14 +966,14 @@ set:
if (function_obj == NULL) {
g_set_error (err, rspamd_mime_expr_quark(), 320,
- "function %*.s is not found for '%s'",
+ "function %.*s is not found for '%s'",
(int)(p - c), c, mime_atom->str);
goto err;
}
if (ucl_object_type (function_obj) != UCL_USERDATA) {
g_set_error (err, rspamd_mime_expr_quark(), 320,
- "function %*.s has invalid type for '%s'",
+ "function %.*s has invalid type for '%s'",
(int)(p - c), c, mime_atom->str);
goto err;
}
diff --git a/src/libserver/dkim.c b/src/libserver/dkim.c
index a4f77bfea..f37fc1005 100644
--- a/src/libserver/dkim.c
+++ b/src/libserver/dkim.c
@@ -346,7 +346,7 @@ rspamd_dkim_parse_domain (rspamd_dkim_context_t * ctx,
g_set_error (err,
DKIM_ERROR,
DKIM_SIGERROR_INVALID_H,
- "invalid dkim domain tag %*.s: idna failed",
+ "invalid dkim domain tag %.*s: idna failed",
(int)len, param);
return FALSE;
@@ -447,7 +447,7 @@ rspamd_dkim_parse_selector (rspamd_dkim_context_t * ctx,
g_set_error (err,
DKIM_ERROR,
DKIM_SIGERROR_INVALID_H,
- "invalid dkim selector tag %*.s: idna failed",
+ "invalid dkim selector tag %.*s: idna failed",
(int)len, param);
return FALSE;
More information about the Commits
mailing list