diff options
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/roll_history.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/libserver/roll_history.c b/src/libserver/roll_history.c index 2f5c5ddb3..c494ce74c 100644 --- a/src/libserver/roll_history.c +++ b/src/libserver/roll_history.c @@ -109,9 +109,15 @@ rspamd_roll_history_update (struct roll_history *history, } /* Add information from task to roll history */ - rspamd_strlcpy (row->from_addr, - rspamd_inet_address_to_string (task->from_addr), - sizeof (row->from_addr)); + if (task->from_addr) { + rspamd_strlcpy (row->from_addr, + rspamd_inet_address_to_string (task->from_addr), + sizeof (row->from_addr)); + } + else { + rspamd_strlcpy (row->from_addr, "unknown", sizeof (row->from_addr)); + } + memcpy (&row->tv, &task->tv, sizeof (row->tv)); /* Strings */ |