Mercurial > dovecot > core-2.2
changeset 16581:debbcfe5577a
pop3: Avoid assert-crash if client disconnects during LIST.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 10 Jul 2013 05:19:22 +0300 |
parents | 4707096101a4 |
children | 9091d0f2d971 |
files | src/pop3/pop3-commands.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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, ".");