commit 8cd410a: [Fix] Fix printing of NULL pointer with fixed length

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Sep 25 10:35:05 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-09-25 11:28:59 +0100
URL: https://github.com/rspamd/rspamd/commit/8cd410a8caf15016f3edecb00a67d3c6f0dfa584 (HEAD -> master)

[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)) {


More information about the Commits mailing list