[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getty s/strcpy/strlcpy/



Minor strlcpy fix for getty(8).


jsyn


--- libexec/getty/main.c.orig	Mon Jul  2 14:18:35 2001
+++ libexec/getty/main.c	Mon Jul  2 14:20:19 2001
@@ -185,7 +185,7 @@ main(argc, argv)
 	openlog("getty", LOG_ODELAY|LOG_CONS|LOG_PID, LOG_AUTH);
 	gethostname(hostname, sizeof(hostname));
 	if (hostname[0] == '\0')
-		strcpy(hostname, "Amnesiac");
+		strlcpy(hostname, "Amnesiac", sizeof(hostname));
 	uname(&kerninfo);
 
 	/*



Visit your host, monkey.org