commit - 8b4b261f2806a6ddbcf0994f02f3ba4502828e8e
commit + 4f3d4d3a79b413ef883104bbbcaec8606cc1f7b7
blob - a68d7c4b162a3cd5f9cb7f9390c8ecb2bc688b48
blob + 894d30c87ad28ffd54f467188cfc943770cae0c0
--- gotsys/parse.y
+++ gotsys/parse.y
yyerror("string too long");
return (findeol());
}
- if (isalnum(c) || c == '_') {
+ if (isalnum((unsigned char)c) || c == '_') {
*p++ = c;
continue;
}
}
#define allowed_in_string(x) \
- (isalnum(x) || (ispunct(x) && x != '(' && x != ')' && \
+ (isalnum((unsigned char)x) || \
+ (ispunct((unsigned char)x) && x != '(' && x != ')' && \
x != '{' && x != '}' && \
x != '!' && x != '=' && x != '#' && \
x != ','))
- if (isalnum(c) || c == ':' || c == '_') {
+ if (isalnum((unsigned char)c) || c == ':' || c == '_') {
do {
*p++ = c;
if ((unsigned)(p-buf) >= sizeof(buf)) {
return 0;
for (i = 0; i < local_len; i++) {
- if (isalnum(s[i]))
+ if (isalnum((unsigned char)s[i]))
continue;
for (j = 0; j < nitems(allowed); j++) {
return 0;
for (i = local_len + 1; i < domain_len; i++) {
- if (isalnum(s[i]) || s[i] == '.' || s[i] == '-')
+ if (isalnum((unsigned char)s[i]) || s[i] == '.' || s[i] == '-')
continue;
return 0;
host_len = strlen(*host);
for (i = 0; i < host_len; i++) {
- if (isalnum((*host)[i]) ||
+ if (isalnum((unsigned char)(*host)[i]) ||
(*host)[i] == '.' || (*host)[i] == '-')
continue;
err = got_error_fmt(GOT_ERR_PARSE_URI,
if (s[i] & 0x80)
return 0;
- if (isalnum(s[i]) ||
+ if (isalnum((unsigned char)s[i]) ||
(i > 0 && s[i] == '-') ||
(i > 0 && s[i] == '_') ||
(i > 0 && s[i] == '.'))
for (i = 0; i < len; i++) {
if (s[i] & 0x80)
return 0;
- if (iscntrl(s[i]))
+ if (iscntrl((unsigned char)s[i]))
return 0;
if (s[i] == '"')
return 0;