summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-22 18:36:33 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-22 18:36:33 +0000
commit03a85ddeaf120bd7234089f9f5333d7895f96deb (patch)
treec79855974065b263d6c3ce6148484735ff28044b /src/users.cpp
parentcb5bcb431dd5ded2bbc749f204878e722e480135 (diff)
Oh yae, Oh Yae, back in old days of yore, Ye Brain doth set the nick buffer as NICKLEN+1 to ease understanding by newbs who didnt know what thou null terminator was.
And yae, at a date later hence, Ye Brain then setteth ye buffer back to NICKLEN again. Alas, neither Ye Brain nor Ye trusty followers hath then setteth back the rest of the core to NICKLEN-1, and verily, chaos ensued. :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3286 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp
index a4be86c9e..3acc8f2a0 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -519,7 +519,7 @@ void AddWhoWas(userrec* u)
{
whowas_hash::iterator iter = whowas.find(u->nick);
WhoWasUser *a = new WhoWasUser();
- strlcpy(a->nick,u->nick,NICKMAX);
+ strlcpy(a->nick,u->nick,NICKMAX-1);
strlcpy(a->ident,u->ident,IDENTMAX);
strlcpy(a->dhost,u->dhost,160);
strlcpy(a->host,u->host,160);
@@ -608,7 +608,7 @@ void AddClient(int socket, int port, bool iscached, in_addr ip4)
log(DEBUG,"AddClient: %d %d %s",socket,port,ipaddr);
clientlist[tempnick]->fd = socket;
- strlcpy(clientlist[tempnick]->nick, tn2,NICKMAX);
+ strlcpy(clientlist[tempnick]->nick, tn2,NICKMAX-1);
/* We don't know the host yet, dns lookup could still be going on,
* so instead we just put the ip address here, for now.
*/