]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp-command-parser - Fix parameter parsing not to fail on particular unico...
authorStephan Bosch <stephan.bosch@open-xchange.com>
Fri, 11 Sep 2020 22:15:35 +0000 (00:15 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 23 Sep 2020 11:33:01 +0000 (11:33 +0000)
Unicode code points were sometimes erroneously checked as ASCII characters.

src/lib-smtp/smtp-command-parser.c

index f60461e8d1421107e094764dc55fab4d28f1b04b..0583f2a378df87c3a28efa1ca1826968e64460c0 100644 (file)
@@ -191,8 +191,7 @@ static int smtp_command_parse_parameters(struct smtp_command_parser *parser)
                                "Invalid UTF-8 character in command parameters");
                        return -1;
                }
-               if ((parser->auth_response || (ch & 0x80) == 0x00) &&
-                   !smtp_char_is_textstr((unsigned char)ch))
+               if (nch == 1 && !smtp_char_is_textstr((unsigned char)ch))
                        break;
                p += nch;
        }