Apply the semantic patch to catch all the places where we pass 'char' to
the <ctype.h> family of functions (isalpha() and friends, toupper(),
tolower()).
(cherry picked from commit
29caa6d1f0f32002245abfa838a5eb00dd7ed4e1)
for (i = 0; i < 255; i++) {
value[i] = keystart[keylen + i];
- if (isspace(value[i]) || value[i] == '\0') {
+ if (isspace((unsigned char)value[i]) || value[i] == '\0') {
value[i] = '\0';
break;
}
* isascii() is valid for full range of int values, no need to
* mask or cast.
*/
- if (!isascii(value)) {
+ if (!isascii((unsigned char)value)) {
return (-1);
}
if ((s = strchr(decdigits, value)) == NULL) {
limit = header->value_len - match_len + 1;
for (size_t i = 0; i < limit; i++) {
- if (isspace(header->value[i])) {
- while (i < limit && isspace(header->value[i])) {
+ if (isspace((unsigned char)header->value[i])) {
+ while (i < limit &&
+ isspace((unsigned char)header->value[i]))
+ {
i++;
}
continue;