]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3422: Buffer overflow in recv-announce
authorJan Klemkow <j.klemkow@wemelug.de>
Thu, 1 Dec 2011 13:16:08 +0000 (02:16 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 1 Dec 2011 13:16:08 +0000 (02:16 +1300)
src/recv-announce.cc

index a57fb4e4432515ceed9ae0d9dfe25031de705e85..f75e3fc0eecceb8283d3d29c87e344b0e87a2657 100644 (file)
@@ -86,7 +86,7 @@ main(int argc, char *argv[])
     socklen_t len;
 
     struct hostent *hp = NULL;
-    char logfile[BUFSIZ];
+    const char *logfile;
     char ip[4];
 
     for (len = 0; len < 32; len++) {
@@ -95,9 +95,9 @@ main(int argc, char *argv[])
 
 
     if (argc > 1)
-        strcpy(logfile, argv[1]);
+        logfile = argv[1];
     else
-        strcpy(logfile, "/tmp/recv-announce.log");
+        logfile = "/tmp/recv-announce.log";
 
     close(1);