char nick[NICKMAX];
/** The users ident reply.
+ * Two characters are added to the user-defined limit to compensate for the tilde etc.
*/
- char ident[IDENTMAX+1];
+ char ident[IDENTMAX+2];
/** The host displayed to non-opers (used for cloaking etc).
* This usually matches the value of userrec::host.
}
else {
strcpy(user->ident,"~"); /* we arent checking ident... but these days why bother anyway? */
- strlcat(user->ident,parameters[0],IDENTMAX);
+ strlcat(user->ident,parameters[0],IDENTMAX+1);
strlcpy(user->fullname,parameters[3],MAXGECOS);
user->registered = (user->registered | 1);
}
strlcpy(clientlist[nick]->host, host,160);
strlcpy(clientlist[nick]->dhost, dhost,160);
clientlist[nick]->server = (char*)FindServerNamePtr(server);
- strlcpy(clientlist[nick]->ident, ident,IDENTMAX); // +1 char to compensate for tilde
+ strlcpy(clientlist[nick]->ident, ident,IDENTMAX+1); // +1 char to compensate for tilde
strlcpy(clientlist[nick]->fullname, gecos,MAXGECOS);
strlcpy(clientlist[nick]->ip,ipaddr,16);
clientlist[nick]->signon = TS;