8332400: isspace argument should be a valid unsigned char

Reviewed-by: dholmes, amitkumar, stuefe, jwaters
This commit is contained in:
Robert Toyonaga 2024-06-14 09:32:52 +00:00 committed by Thomas Stuefe
parent 9b0a5c5cd0
commit cc64aeac47
8 changed files with 17 additions and 17 deletions

View file

@ -501,7 +501,7 @@ static jboolean expand(JLI_List args, const char *str, const char *var_name) {
// This is retained until the process terminates as it is saved as the args
p = JLI_MemAlloc(JLI_StrLen(str) + 1);
while (*str != '\0') {
while (*str != '\0' && isspace(*str)) {
while (*str != '\0' && isspace((unsigned char) *str)) {
str++;
}
@ -511,7 +511,7 @@ static jboolean expand(JLI_List args, const char *str, const char *var_name) {
}
arg = p;
while (*str != '\0' && !isspace(*str)) {
while (*str != '\0' && !isspace((unsigned char) *str)) {
if (inEnvVar && (*str == '"' || *str == '\'')) {
quote = *str++;
while (*str != quote && *str != '\0') {
@ -577,7 +577,7 @@ static jboolean expand(JLI_List args, const char *str, const char *var_name) {
exit(1);
}
assert (*str == '\0' || isspace(*str));
assert (*str == '\0' || isspace((unsigned char) *str));
}
return JNI_TRUE;