From f96ab3f010bdadd22c4d77a3c451c5182a411551 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Wed, 15 Jul 2026 18:40:14 -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 2.12.1