mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
Fix output corruption when host is exactly 64 chars long
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3944 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
44809375aa
commit
a5f22007f0
@ -32,7 +32,7 @@ class connection : public Extensible
|
||||
|
||||
/** Hostname of connection. Not used if this is a serverrec
|
||||
*/
|
||||
char host[64];
|
||||
char host[65];
|
||||
|
||||
/** Stats counter for bytes inbound
|
||||
*/
|
||||
|
@ -111,8 +111,8 @@ public:
|
||||
{
|
||||
if ((std::string((char*)inet_ntoa(usr->ip4)) == ip) && (hostname.length() < 65))
|
||||
{
|
||||
strlcpy(usr->host,hostname.c_str(),MAXBUF);
|
||||
strlcpy(usr->dhost,hostname.c_str(),MAXBUF);
|
||||
strlcpy(usr->host,hostname.c_str(),64);
|
||||
strlcpy(usr->dhost,hostname.c_str(),64);
|
||||
/*address_cache::iterator address = addrcache.find(usr->ip4);
|
||||
if (address == addrcache.end())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user