]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-imap: IMAP protocol parser was parsing NIL case-sensitively.
authorTimo Sirainen <tss@iki.fi>
Sat, 2 Nov 2013 18:05:08 +0000 (20:05 +0200)
committerTimo Sirainen <tss@iki.fi>
Sat, 2 Nov 2013 18:05:08 +0000 (20:05 +0200)
Luckily no commands currently actually use NILs.

src/lib-imap/imap-parser.c

index 97c0366f5b869af1f9ed78fd1655e5811c1e07a4..cd43ae00b902ee0e2119cecd59ebf61703d5784c 100644 (file)
@@ -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 {