From: florian Date: Thu, 15 Dec 2022 08:06:13 +0000 (+0000) Subject: The argument to ctype functions must be EOF or representable as an X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4a50067c81ccb6fd6654540923abf553683ef01d;p=openbsd The argument to ctype functions must be EOF or representable as an unsigned char. Casting to int is particularly useless because that's what the compiler already does. We need to prevent sign extension, not write down that we want sign extension. OK deraadt, kn, miod --- diff --git a/usr.sbin/acme-client/parse.y b/usr.sbin/acme-client/parse.y index c9ca9ca27e8..2b0d55f20b1 100644 --- a/usr.sbin/acme-client/parse.y +++ b/usr.sbin/acme-client/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.44 2022/10/09 09:59:31 op Exp $ */ +/* $OpenBSD: parse.y,v 1.45 2022/12/15 08:06:13 florian Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons @@ -1101,7 +1101,7 @@ domain_valid(const char *cp) for ( ; *cp != '\0'; cp++) if (!(*cp == '.' || *cp == '-' || - *cp == '_' || isalnum((int)*cp))) + *cp == '_' || isalnum((unsigned char)*cp))) return 0; return 1; }