diff options
Diffstat (limited to 'src/libutil/printf.c')
-rw-r--r-- | src/libutil/printf.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/libutil/printf.c b/src/libutil/printf.c index 67a2f3d98..c8c6ace42 100644 --- a/src/libutil/printf.c +++ b/src/libutil/printf.c @@ -486,12 +486,20 @@ rspamd_vprintf_common (rspamd_printf_append_func func, if (v) { RSPAMD_PRINTF_APPEND (v->str, v->len); } + else { + RSPAMD_PRINTF_APPEND ("(NULL)", 6); + } continue; case 'T': tok = va_arg (args, rspamd_ftok_t *); - RSPAMD_PRINTF_APPEND (tok->begin, tok->len); + if (tok) { + RSPAMD_PRINTF_APPEND (tok->begin, tok->len); + } + else { + RSPAMD_PRINTF_APPEND ("(NULL)", 6); + } continue; case 'v': @@ -499,6 +507,9 @@ rspamd_vprintf_common (rspamd_printf_append_func func, if (gs) { RSPAMD_PRINTF_APPEND (gs->str, gs->len); } + else { + RSPAMD_PRINTF_APPEND ("(NULL)", 6); + } continue; |