From 82effc97f9f2d1c258ea50cb11b130753b8ba805 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 1 Jan 2015 16:59:35 -0600 Subject: Switch a lot of strncpy() calls to xstrncpy(). --- toys/other/login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/other/login.c') 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; -- cgit v1.2.3