]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp proxy: Don't internally finish proxying before client has even sent DATA command.
authorTimo Sirainen <tss@iki.fi>
Mon, 8 Nov 2010 18:37:25 +0000 (18:37 +0000)
committerTimo Sirainen <tss@iki.fi>
Mon, 8 Nov 2010 18:37:25 +0000 (18:37 +0000)
This fixes some crashes when all recipients were invalid.

src/lmtp/lmtp-proxy.c

index 82794ec274f990dec77c394200062ecd9a844bc0..eb69c8553f99d5c626b7c34814e56286d222bef1 100644 (file)
@@ -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 ||