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:
@@ -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
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user