Browse Source

Fix NULL fixed strings printing.

tags/1.0.5
Vsevolod Stakhov 8 years ago
parent
commit
e180aa8a5b
1 changed files with 12 additions and 1 deletions
  1. 12
    1
      src/libutil/printf.c

+ 12
- 1
src/libutil/printf.c View File

@@ -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;


Loading…
Cancel
Save