commit - eec652956987c6dd79b380524a05658e62f3739a28baf82e131d9b325af12959
commit + 3a22fb5dfd51ab01c32c24769587ba9ef59edbc46dc1254280acd681890a2ac3
blob - 0e88233a60e248b4c2f77607b0185da6383164dfb58f59764fa8bfd90c65fc4b
blob + e584ff98c2f1908fc4d01a2361bb1122af40d2d25f3444b4eb381eee9bdcdbe6
--- 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;