From: Timo Sirainen Date: Mon, 8 Nov 2010 18:37:25 +0000 (+0000) Subject: lmtp proxy: Don't internally finish proxying before client has even sent DATA command. X-Git-Tag: 2.0.7~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e0950766ff8ccd45432ff7bfdbfee8e824c116a;p=thirdparty%2Fdovecot%2Fcore.git lmtp proxy: Don't internally finish proxying before client has even sent DATA command. This fixes some crashes when all recipients were invalid. --- 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 ||