From: Vsevolod Stakhov Date: Wed, 25 Sep 2019 10:28:59 +0000 (+0100) Subject: [Fix] Fix printing of NULL pointer with fixed length X-Git-Tag: 2.0~131 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8cd410a8caf15016f3edecb00a67d3c6f0dfa584;p=rspamd.git [Fix] Fix printing of NULL pointer with fixed length --- 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)) {