1
0
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:
Bram Matthys
2008-12-22 16:12:30 +00:00
parent f17c5cc9e1
commit cdd38d79f4
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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;