From 3aa7b7b46438dcb7bf074e1dc7a9ec4924df3de7 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Wed, 15 Jul 2026 13:20:41 -1000 Subject: Cast signed chars before ctype calls A plain char is undefined in the ctype functions for negative values, which a high byte produces wherever char is signed. --- source/ui-clone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/ui-clone.c') diff --git a/source/ui-clone.c b/source/ui-clone.c index e11f496..c554c24 100644 --- a/source/ui-clone.c +++ b/source/ui-clone.c @@ -115,7 +115,7 @@ void cgit_clone_objects(void) for (p = ctx.qry.path; *p; ++p) { if (*p == '.' && *(p + 1) == '.') goto err; - if (!isalnum(*p) && *p != '/' && *p != '.' && *p != '-') + if (!isalnum((unsigned char)*p) && *p != '/' && *p != '.' && *p != '-') goto err; } -- cgit v2.8.0