]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix printing of NULL pointer with fixed length
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 25 Sep 2019 10:28:59 +0000 (11:28 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 25 Sep 2019 10:28:59 +0000 (11:28 +0100)
src/libutil/printf.c

index 9db2bfe7d0ba6865a5b8590da20aa19caa42c813..b0229c73a7c9216cc13e72275c04dd8cabc1baf5 100644 (file)
@@ -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)) {