addr->in6[cpos + jj] = 0;
}
} else if (dot) {
- unsigned int ip4;
+ uint32_t ip4;
pos = irc_pton_ip4(input, bits, &ip4);
if (pos) {
addr->in6[5] = htons(65535);
m++;
/* allow escaping to force capitalization */
if (*m++ != *n++)
- return 0;
+ goto backtrack;
break;
case '*': case '?':
for (star_p = 0; ; m++) {
return 1;
}
/* If only matching the visible hostnames, bail early. */
- if ((flags & MATCH_VISIBLE) && (IsFakeHost(user) || IsHiddenHost(user)))
+ if ((flags & MATCH_VISIBLE) && IsHiddenHost(user)
+ && (IsFakeHost(user) || (hidden_host_suffix && user->handle_info)))
return 0;
/* If it might be an IP glob, test that. */
if (!glob[strspn(glob, "0123456789./*?")]
/* process the string, resetting the count if we find a unit character */
while ((c = *interval++)) {
- if (isdigit((int)c)) {
- partial = partial*10 + c - '0';
- } else {
- seconds += TypeLength(c) * partial;
- partial = 0;
- }
+ if (isdigit((int)c)) {
+ partial = partial*10 + c - '0';
+ } else if (strchr("yMwdhms", c)) {
+ seconds += TypeLength(c) * partial;
+ partial = 0;
+ } else {
+ return 0;
+ }
}
/* assume the last chunk is seconds (the normal case) */
return seconds + partial;