diff --git a/common/fileops.c b/common/fileops.c index 0779a1f80..adcb1cf8a 100644 --- a/common/fileops.c +++ b/common/fileops.c @@ -161,7 +161,7 @@ sudo_parseln(FILE *fp) len = strlen(buf); while (len > 0 && isspace((unsigned char)buf[len - 1])) buf[--len] = '\0'; - for (cp = buf; isblank(*cp); cp++) + for (cp = buf; isblank((unsigned char)*cp); cp++) continue; } return(cp); diff --git a/plugins/sudoers/defaults.c b/plugins/sudoers/defaults.c index d204da565..79feafcf3 100644 --- a/plugins/sudoers/defaults.c +++ b/plugins/sudoers/defaults.c @@ -669,13 +669,13 @@ store_list(char *str, struct sudo_defs_types *def, int op) end = str; do { /* Remove leading blanks, if nothing but blanks we are done. */ - for (start = end; isblank(*start); start++) + for (start = end; isblank((unsigned char)*start); start++) ; if (*start == '\0') break; /* Find end position and perform operation. */ - for (end = start; *end && !isblank(*end); end++) + for (end = start; *end && !isblank((unsigned char)*end); end++) ; list_op(start, end - start, def, op == '-' ? delete : add); } while (*end++ != '\0');