From 0c0059989fbac8f0c03c4426461c5c78169ff512 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Tue, 30 Jan 2018 14:28:17 +0200 Subject: [PATCH] [Minor] Avoid letting miltertest crash rspamd_proxy --- src/libserver/milter.c | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- 2.39.5