From 1e0950766ff8ccd45432ff7bfdbfee8e824c116a Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 8 Nov 2010 18:37:25 +0000 Subject: [PATCH] lmtp proxy: Don't internally finish proxying before client has even sent DATA command. This fixes some crashes when all recipients were invalid. --- src/lmtp/lmtp-proxy.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lmtp/lmtp-proxy.c b/src/lmtp/lmtp-proxy.c index 82794ec274..eb69c8553f 100644 --- a/src/lmtp/lmtp-proxy.c +++ b/src/lmtp/lmtp-proxy.c @@ -202,6 +202,10 @@ static void lmtp_proxy_finish(struct lmtp_proxy *proxy) static void lmtp_proxy_try_finish(struct lmtp_proxy *proxy) { + if (proxy->finish_callback == NULL) { + /* DATA command hasn't been sent yet */ + return; + } if (lmtp_proxy_send_data_replies(proxy) && (proxy->data_input == NULL || proxy->data_input->eof || -- 2.47.3