From: Timo Sirainen Date: Sat, 2 Nov 2013 18:05:08 +0000 (+0200) Subject: lib-imap: IMAP protocol parser was parsing NIL case-sensitively. X-Git-Tag: 2.2.7~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f7464ce41ebaa922cb36e85fdd14e27c4c43eba8;p=thirdparty%2Fdovecot%2Fcore.git lib-imap: IMAP protocol parser was parsing NIL case-sensitively. Luckily no commands currently actually use NILs. --- diff --git a/src/lib-imap/imap-parser.c b/src/lib-imap/imap-parser.c index 97c0366f5b..cd43ae00b9 100644 --- a/src/lib-imap/imap-parser.c +++ b/src/lib-imap/imap-parser.c @@ -233,7 +233,7 @@ static void imap_parser_save_arg(struct imap_parser *parser, switch (parser->cur_type) { case ARG_PARSE_ATOM: case ARG_PARSE_TEXT: - if (size == 3 && memcmp(data, "NIL", 3) == 0) { + if (size == 3 && i_memcasecmp(data, "NIL", 3) == 0) { /* NIL argument */ arg->type = IMAP_ARG_NIL; } else {