dovecot-1.1: imap-parser: Don't return early if line ends with C...
dovecot at dovecot.org
dovecot at dovecot.org
Tue May 26 04:23:24 EEST 2009
details: http://hg.dovecot.org/dovecot-1.1/rev/b48cf2b9be1a
changeset: 8288:b48cf2b9be1a
user: Timo Sirainen <tss at iki.fi>
date: Mon May 25 21:23:19 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 5039adc82996 -r b48cf2b9be1a src/lib-imap/imap-parser.c
--- a/src/lib-imap/imap-parser.c Mon May 25 19:30:05 2009 -0400
+++ b/src/lib-imap/imap-parser.c Mon May 25 21:23:19 2009 -0400
@@ -452,6 +452,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