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

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


details:   http://hg.dovecot.org/dovecot-1.2/rev/fa9bc4ef6f32
changeset: 9028:fa9bc4ef6f32
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 421393827a81 -r fa9bc4ef6f32 src/imap/cmd-append.c
--- a/src/imap/cmd-append.c	Thu May 14 17:20:02 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