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