dovecot-2.0: APPEND: Don't assert-crash if message size paramete...

dovecot at dovecot.org dovecot at dovecot.org
Fri May 15 20:07:06 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/22369ac2c99c
changeset: 9286:22369ac2c99c
user:      Timo Sirainen <tss at iki.fi>
date:      Fri May 15 13:06:15 2009 -0400
description:
APPEND: Don't assert-crash if message size parameter isn't given.

diffstat:

1 file changed, 5 insertions(+)
src/imap/cmd-append.c |    5 +++++

diffs (15 lines):

diff -r a5973f031e7a -r 22369ac2c99c src/imap/cmd-append.c
--- a/src/imap/cmd-append.c	Thu May 14 19:44:27 2009 -0400
+++ b/src/imap/cmd-append.c	Fri May 15 13:06:15 2009 -0400
@@ -254,6 +254,11 @@ static bool cmd_append_continue_parsing(
 			cmd_append_finish(ctx);
 			return TRUE;
 		}
+		if (ctx->count == 0) {
+			client_send_tagline(cmd, "BAD Missing message size.");
+			cmd_append_finish(ctx);
+			return TRUE;
+		}
 
 		ret = mailbox_transaction_commit_get_uids(&ctx->t,
 							  &uid_validity,


More information about the dovecot-cvs mailing list