aboutsummaryrefslogtreecommitdiff
path: root/toys/other/login.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-01-01 16:59:35 -0600
committerRob Landley <rob@landley.net>2015-01-01 16:59:35 -0600
commit82effc97f9f2d1c258ea50cb11b130753b8ba805 (patch)
treef6c584d2b1675a91eb1a016977560ff7148c15a1 /toys/other/login.c
parent5f53d130b1eae9041cc88c0ffb89e2b5823da393 (diff)
downloadtoybox-82effc97f9f2d1c258ea50cb11b130753b8ba805.tar.gz
Switch a lot of strncpy() calls to xstrncpy().
Diffstat (limited to 'toys/other/login.c')
-rw-r--r--toys/other/login.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/other/login.c b/toys/other/login.c
index 91523d43..0d6d3640 100644
--- a/toys/other/login.c
+++ b/toys/other/login.c
@@ -165,7 +165,7 @@ void login_main(void)
tcflush(0, TCIFLUSH);
username[sizeof(username)-1] = 0;
- if (*toys.optargs) strncpy(username, *toys.optargs, sizeof(username)-1);
+ if (*toys.optargs) xstrncpy(username, *toys.optargs, sizeof(username));
else {
read_user(username, sizeof(username));
if (!*username) continue;