]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix output corruption when host is exactly 64 chars long
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 10 May 2006 22:59:53 +0000 (22:59 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 10 May 2006 22:59:53 +0000 (22:59 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3944 e03df62e-2008-0410-955e-edbf42e46eb7

include/connection.h
src/dnsqueue.cpp

index 52a485f8b38de0b5724e5eb087a2df611a14df8e..6f918204d1c69c56f15b91f9e9f6f39fe1e14909 100644 (file)
@@ -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
         */
index fee15febd56749c153081dc338a4215c224e8ba7..975884796f7dd24f9963c58dfb98cc77b9257077 100644 (file)
@@ -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())
                                                                {