]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/dnsqueue.cpp
Someone doesnt validate their input.... ;-p
[user/henk/code/inspircd.git] / src / dnsqueue.cpp
index c117ad4cba5434fe886aab99a5363c5efa103b24..f14fd8c048241de018060a327964fdbbc1a19167 100644 (file)
@@ -53,8 +53,6 @@ using namespace std;
 extern ServerConfig* Config;
 extern InspIRCd* ServerInstance;
 
-address_cache addrcache;
-
 class Lookup;
 
 Lookup* dnslist[MAX_DESCRIPTORS];
@@ -95,7 +93,7 @@ public:
                        {
                                return false;
                        }
-                       strlcpy(u,nick.c_str(),NICKMAX);
+                       strlcpy(u,nick.c_str(),NICKMAX-1);
 
                        /* ASSOCIATE WITH DNS LOOKUP LIST */
                        if (resolver1.GetFD() != -1)
@@ -207,7 +205,7 @@ public:
        }
 };
 
-bool lookup_dns(std::string nick)
+bool lookup_dns(const std::string &nick)
 {
        /* First attempt to find the nickname */
        userrec* u = Find(nick);