From 7a5b475c3f48038adc7f627ba28546bf0d92b5ab Mon Sep 17 00:00:00 2001 From: UnionSystems <144504380+UnionSystems@users.noreply.github.com> Date: Sun, 7 Dec 2025 20:40:10 +0100 Subject: [PATCH] Fix isspace undefined behaviour This commit fixes isspace undefined behaviour when a value of a single signed char in input string exceeds 127. --- pdfgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdfgen.c b/pdfgen.c index 18df69d..dad1cad 100644 --- a/pdfgen.c +++ b/pdfgen.c @@ -1903,7 +1903,7 @@ static const char *find_word_break(const char *string) if (!string) return NULL; /* Skip over the actual word */ - while (*string && !isspace(*string)) + while (*string && !isspace((unsigned char)*string)) string++; return string;