diff options
author | Rob Landley | 2006-06-25 22:59:31 +0000 |
---|---|---|
committer | Rob Landley | 2006-06-25 22:59:31 +0000 |
commit | cf7577d4171d517690e95e7225979bfde32fce7c (patch) | |
tree | ba304684df300a2c2926a4d52b8e42332f478b10 /loginutils | |
parent | 11c7a7bed60a55a670363bec3c07e8d88aa372b7 (diff) | |
download | busybox-cf7577d4171d517690e95e7225979bfde32fce7c.zip busybox-cf7577d4171d517690e95e7225979bfde32fce7c.tar.gz |
Missed one. Based on suggestions from Erik Hovland.
Diffstat (limited to 'loginutils')
-rw-r--r-- | loginutils/getty.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c index e68f2cd..bb9ed0d 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c @@ -808,14 +808,14 @@ static void update_utmp(char *line) } else { /* some inits don't initialize utmp... */ memset(&ut, 0, sizeof(ut)); - strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id)); + safe_strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id)); } /*endutent(); */ - strncpy(ut.ut_user, "LOGIN", sizeof(ut.ut_user)); - strncpy(ut.ut_line, line, sizeof(ut.ut_line)); + strcpy(ut.ut_user, "LOGIN"); + safe_strncpy(ut.ut_line, line, sizeof(ut.ut_line)); if (fakehost) - strncpy(ut.ut_host, fakehost, sizeof(ut.ut_host)); + safe_strncpy(ut.ut_host, fakehost, sizeof(ut.ut_host)); time(&t); ut.ut_time = t; ut.ut_type = LOGIN_PROCESS; |