From: Timo Sirainen Date: Fri, 4 Jun 2021 09:45:08 +0000 (+0300) Subject: lib-imap: imap-parser - Fix 8 bit atom check to use unsigned char. X-Git-Tag: 2.3.16~60 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=71e1d599ed24da48f721487ffaa6f004b17a1ea8;p=thirdparty%2Fdovecot%2Fcore.git lib-imap: imap-parser - Fix 8 bit atom check to use unsigned char. --- diff --git a/src/lib-imap/imap-parser.c b/src/lib-imap/imap-parser.c index cc283f5c06..20cee08c29 100644 --- a/src/lib-imap/imap-parser.c +++ b/src/lib-imap/imap-parser.c @@ -305,7 +305,7 @@ static bool is_valid_atom_char(struct imap_parser *parser, char chr) if (IS_ATOM_PARSER_INPUT((unsigned char)chr)) error_msg = "Invalid characters in atom"; - else if ((chr & 0x80) != 0) + else if ((((unsigned char)chr) & 0x80) != 0) error_msg = "8bit data in atom"; else return TRUE;