} else {
/* The host part of the mask isn't IP-based */
if (IsFakeHost(user) && match_ircglob(user->fakehost, glob))
- return 1;
+ return 1;
if (hidden_host_suffix && user->handle_info) {
char hidden_host[HOSTLEN+1];
snprintf(hidden_host, sizeof(hidden_host), "%s.%s", user->handle_info->handle, hidden_host_suffix);
/* pre-C99 behavior; double buffer size until it is big enough */
va_end(working);
VA_COPY(working, args);
- while ((ret = vsnprintf(buf->list + buf->used, buf->size, fmt, working)) == -1) {
+ while ((ret = vsnprintf(buf->list + buf->used, buf->size - buf->used, fmt, working)) <= 0) {
buf->size += len;
buf->list = realloc(buf->list, buf->size);
va_end(working);