dovecot-2.0: lmtp proxy: Don't internally finish proxying before...

dovecot at dovecot.org dovecot at dovecot.org
Mon Nov 8 20:38:36 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/748e613fd73a
changeset: 12398:748e613fd73a
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Nov 08 18:37:25 2010 +0000
description:
lmtp proxy: Don't internally finish proxying before client has even sent DATA command.
This fixes some crashes when all recipients were invalid.

diffstat:

 src/lmtp/lmtp-proxy.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 2a252c9cda5e -r 748e613fd73a src/lmtp/lmtp-proxy.c
--- a/src/lmtp/lmtp-proxy.c	Mon Nov 08 18:30:05 2010 +0000
+++ b/src/lmtp/lmtp-proxy.c	Mon Nov 08 18:37:25 2010 +0000
@@ -202,6 +202,10 @@
 
 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 ||


More information about the dovecot-cvs mailing list