aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/logger.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/logger.c')
-rw-r--r--src/libutil/logger.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libutil/logger.c b/src/libutil/logger.c
index 604fe8348..082c12d14 100644
--- a/src/libutil/logger.c
+++ b/src/libutil/logger.c
@@ -993,7 +993,9 @@ file_log_function (const gchar *module, const gchar *id,
m = modulebuf;
if (id != NULL) {
- mr = rspamd_snprintf (m, mremain, "<%*.s>; ", LOG_ID,
+ guint slen = strlen (id);
+ slen = MIN (LOG_ID, slen);
+ mr = rspamd_snprintf (m, mremain, "<%*.s>; ", slen,
id);
m += mr;
mremain -= mr;