mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-03 08:53:12 +02:00
- Fix OOB read caused by UHNAMES support.
This commit is contained in:
@@ -1690,3 +1690,4 @@
|
||||
Darth Android (#0003738).
|
||||
- Fix NAMES with UHNAMES support, screwed it up at 'Win32 compile fixes' a
|
||||
few lines up...
|
||||
- Fix OOB read caused by UHNAMES support.
|
||||
|
||||
@@ -90,7 +90,7 @@ static char buf[BUFSIZE];
|
||||
#define TRUNCATED_NAMES 64
|
||||
DLLFUNC CMD_FUNC(m_names)
|
||||
{
|
||||
int uhnames = SupportUHNAMES(sptr); // cache UHNAMES support
|
||||
int uhnames = (MyConnect(sptr) && SupportUHNAMES(sptr)); // cache UHNAMES support
|
||||
int bufLen = NICKLEN + (!uhnames ? 0 : (1 + USERLEN + 1 + HOSTLEN));
|
||||
int mlen = strlen(me.name) + bufLen + 7;
|
||||
aChannel *chptr;
|
||||
|
||||
Reference in New Issue
Block a user