1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-02 11:06:38 +02:00

inetntop() was using a wrong sizeof() which could trigger a message

about an overflow with eg 'STATS maxperip' (IRCOp-only command).
Also, STATS maxperip failed to return 1 in the hook, resulting in
unnecessary STATS help output after the list.
This commit is contained in:
Bram Matthys
2025-10-10 08:40:06 +02:00
parent 32570ad2f8
commit 6a837bf669
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -340,7 +340,7 @@ int stats_maxperip(Client *client, const char *para)
}
}
return 0;
return 1;
}
/** Returns 1 if allow::maxperip is exceeded by 'client' */
+1 -1
View File
@@ -142,7 +142,7 @@ const char *inetntop(int af, const void *in, char *out, size_t size)
{
char tmp[MYDUMMY_SIZE];
inet_ntop(af, in, tmp, size);
inet_ntop(af, in, tmp, sizeof(tmp));
if (!strstr(tmp, "::"))
{
/* IPv4 or IPv6 that is already uncompressed */