commit - 46fa6498d5de78cc0dce21a09958993f0ebc274d
commit + 97c63ac4bc839a924d281e8942f90d3a4e8e59dd
blob - 97555fb391c138b895b056ac33aa9ae9bf247c3d
blob + 242e46a968fe0b2194b050837f83b63dbd7d2e56
--- 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;