dovecot-2.2: pop3: Avoid assert-crash if client disconnects duri...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jul 10 05:19:35 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/debbcfe5577a
changeset: 16581:debbcfe5577a
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jul 10 05:19:22 2013 +0300
description:
pop3: Avoid assert-crash if client disconnects during LIST.

diffstat:

 src/pop3/pop3-commands.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 4707096101a4 -r debbcfe5577a src/pop3/pop3-commands.c
--- a/src/pop3/pop3-commands.c	Wed Jul 10 03:27:52 2013 +0300
+++ b/src/pop3/pop3-commands.c	Wed Jul 10 05:19:22 2013 +0300
@@ -132,6 +132,8 @@
 	struct cmd_list_context *ctx = client->cmd_context;
 
 	for (; ctx->msgnum != client->messages_count; ctx->msgnum++) {
+		if (client->output->closed)
+			break;
 		if (POP3_CLIENT_OUTPUT_FULL(client)) {
 			/* buffer full */
 			return;
@@ -145,8 +147,6 @@
 
 		client_send_line(client, "%u %"PRIuUOFF_T, ctx->msgnum+1,
 				 client->message_sizes[ctx->msgnum]);
-		if (client->output->closed)
-			break;
 	}
 
 	client_send_line(client, ".");


More information about the dovecot-cvs mailing list