Blame SOURCES/tcp_wrappers-7.6-bug11881.patch

23cc51
diff -up tcp_wrappers_7.6/eval.c.patch4 tcp_wrappers_7.6/eval.c
23cc51
--- tcp_wrappers_7.6/eval.c.patch4	1995-01-30 19:51:46.000000000 +0100
23cc51
+++ tcp_wrappers_7.6/eval.c	2008-08-29 09:45:12.000000000 +0200
23cc51
@@ -111,7 +111,7 @@ struct request_info *request;
23cc51
 	return (hostinfo);
23cc51
 #endif
23cc51
     if (STR_NE(eval_user(request), unknown)) {
23cc51
-	sprintf(both, "%s@%s", request->user, hostinfo);
23cc51
+	snprintf(both, sizeof(both), "%s@%s", request->user, hostinfo);
23cc51
 	return (both);
23cc51
     } else {
23cc51
 	return (hostinfo);
23cc51
@@ -128,7 +128,7 @@ struct request_info *request;
23cc51
     char   *daemon = eval_daemon(request);
23cc51
 
23cc51
     if (STR_NE(host, unknown)) {
23cc51
-	sprintf(both, "%s@%s", daemon, host);
23cc51
+	snprintf(both, sizeof(both), "%s@%s", daemon, host);
23cc51
 	return (both);
23cc51
     } else {
23cc51
 	return (daemon);
23cc51
diff -up tcp_wrappers_7.6/tcpd.c.patch4 tcp_wrappers_7.6/tcpd.c
23cc51
--- tcp_wrappers_7.6/tcpd.c.patch4	1996-02-11 17:01:33.000000000 +0100
23cc51
+++ tcp_wrappers_7.6/tcpd.c	2008-08-29 09:45:12.000000000 +0200
23cc51
@@ -60,10 +60,10 @@ char  **argv;
23cc51
      */
23cc51
 
23cc51
     if (argv[0][0] == '/') {
23cc51
-	strcpy(path, argv[0]);
23cc51
+	strncpy(path, argv[0], sizeof(path));
23cc51
 	argv[0] = strrchr(argv[0], '/') + 1;
23cc51
     } else {
23cc51
-	sprintf(path, "%s/%s", REAL_DAEMON_DIR, argv[0]);
23cc51
+	snprintf(path, sizeof(path), "%s/%s", REAL_DAEMON_DIR, argv[0]);
23cc51
     }
23cc51
 
23cc51
     /*