From 633433b29b0fae25fd809af4777433c4ed6b36a3 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Thu, 16 May 2024 21:28:37 +0000 Subject: [PATCH] Fix uncasted use of isspace() isspace() is intended to be used with an unsigned 8-bit input. Using isspace() with any other type of input is technically undefined behavior. --- cli/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/main.c b/cli/main.c index d89d14e..0ddcb8d 100644 --- a/cli/main.c +++ b/cli/main.c @@ -369,7 +369,7 @@ apply_modversion(pkgconf_client_t *client, pkgconf_pkg_t *world, void *data, int if (name_len > strlen(queue_node->package) || strncmp(pkg->why, queue_node->package, name_len) || (queue_node->package[name_len] != 0 && - !isspace(queue_node->package[name_len]) && + !isspace((unsigned char)queue_node->package[name_len]) && !PKGCONF_IS_OPERATOR_CHAR(queue_node->package[name_len]))) continue;