mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-06 21:43:13 +02:00
- Fix OOB read caused by UHNAMES support.
This commit is contained in:
@@ -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