dovecot-1.2: imap-parser: Don't return early if line ends with C...
dovecot at dovecot.org
dovecot at dovecot.org
Tue May 26 04:23:27 EEST 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/09f78cad5d58
changeset: 9081:09f78cad5d58
user: Timo Sirainen <tss at iki.fi>
date: Mon May 25 21:23:21 2009 -0400
description:
imap-parser: Don't return early if line ends with CR but there's no LF.
diffstat:
1 file changed, 9 insertions(+)
src/lib-imap/imap-parser.c | 9 +++++++++
diffs (19 lines):
diff -r f1b0ef72cea7 -r 09f78cad5d58 src/lib-imap/imap-parser.c
--- a/src/lib-imap/imap-parser.c Mon May 25 20:41:08 2009 -0400
+++ b/src/lib-imap/imap-parser.c Mon May 25 21:23:21 2009 -0400
@@ -453,6 +453,15 @@ static int imap_parser_read_arg(struct i
switch (data[0]) {
case '\r':
+ if (data_size == 1) {
+ /* wait for LF */
+ return FALSE;
+ }
+ if (data[1] != '\n') {
+ parser->error = "CR sent without LF";
+ return FALSE;
+ }
+ /* fall through */
case '\n':
/* unexpected end of line */
parser->eol = TRUE;
More information about the dovecot-cvs
mailing list