]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3422: Buffer overflow in recv-announce
authorJan Klemkow <j.klemkow@wemelug.de>
Fri, 2 Dec 2011 12:56:17 +0000 (05:56 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 2 Dec 2011 12:56:17 +0000 (05:56 -0700)
src/recv-announce.cc

index 61a58e7d168d8512c6d7108a224c734610c0f1cf..4a6a398cac0775e3c267e41fb80a1c0b45cdadff 100644 (file)
@@ -90,7 +90,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++) {
@@ -99,9 +99,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);