From: Andrew Lewis Date: Tue, 30 Jan 2018 12:28:17 +0000 (+0200) Subject: [Minor] Avoid letting miltertest crash rspamd_proxy X-Git-Tag: 1.6.6~2^2~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0c0059989fbac8f0c03c4426461c5c78169ff512;p=rspamd.git [Minor] Avoid letting miltertest crash rspamd_proxy --- diff --git a/src/libserver/milter.c b/src/libserver/milter.c index d83bf2308..3081947b9 100644 --- a/src/libserver/milter.c +++ b/src/libserver/milter.c @@ -529,6 +529,10 @@ rspamd_milter_process_command (struct rspamd_milter_session *session, break; case RSPAMD_MILTER_CMD_HEADER: msg_debug_milter ("got header command"); + if (!session->message) { + session->message = rspamd_fstring_sized_new ( + RSPAMD_MILTER_MESSAGE_CHUNK); + } zero = memchr (pos, '\0', cmdlen); if (zero == NULL) {