[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
getty s/strcpy/strlcpy/
- To: bugs_(_at_)_openbsd_(_dot_)_org
- Subject: getty s/strcpy/strlcpy/
- From: jsyn <jsyn_(_at_)_nthought_(_dot_)_com>
- Date: Mon, 2 Jul 2001 14:38:55 -0500
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