]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-imap: is_valid_atom_char() - Fix implicit conversion from unsigned to signed...
authorMarco Bettini <marco.bettini@open-xchange.com>
Mon, 4 Jul 2022 09:51:01 +0000 (09:51 +0000)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 4 Jul 2022 17:17:25 +0000 (17:17 +0000)
src/lib-imap/imap-parser.c

index 2deb75f5fba4943f6f22aac3746fdf89706b6e2a..933dd9c5024dd9882100d91913d38525cb62905f 100644 (file)
@@ -299,13 +299,13 @@ static void imap_parser_save_arg(struct imap_parser *parser,
        parser->cur_type = ARG_PARSE_NONE;
 }
 
-static bool is_valid_atom_char(struct imap_parser *parser, char chr)
+static bool is_valid_atom_char(struct imap_parser *parser, unsigned char chr)
 {
        const char *error_msg;
 
-       if (IS_ATOM_PARSER_INPUT((unsigned char)chr))
+       if (IS_ATOM_PARSER_INPUT(chr))
                error_msg = "Invalid characters in atom";
-       else if ((((unsigned char)chr) & 0x80) != 0)
+       else if ((chr & 0x80) != 0)
                error_msg = "8bit data in atom";
        else
                return TRUE;