From 8cd410a8caf15016f3edecb00a67d3c6f0dfa584 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 25 Sep 2019 11:28:59 +0100 Subject: [PATCH] [Fix] Fix printing of NULL pointer with fixed length --- src/libutil/printf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libutil/printf.c b/src/libutil/printf.c index 9db2bfe7d..b0229c73a 100644 --- a/src/libutil/printf.c +++ b/src/libutil/printf.c @@ -801,6 +801,7 @@ rspamd_vprintf_common (rspamd_printf_append_func func, p = va_arg (args, gchar *); if (p == NULL) { p = "(NULL)"; + slen = sizeof ("(NULL)") - 1; } if (G_UNLIKELY (b32)) { -- 2.39.5