aboutsummaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
author"Vladimir N. Oleynik" <dzo@simtreas.ru>2006-01-31 11:19:12 +0000
committer"Vladimir N. Oleynik" <dzo@simtreas.ru>2006-01-31 11:19:12 +0000
commit39e75106640e17d824c6da00b20ad6d76ede91c5 (patch)
tree79e01d58d514946221b97b89209c7065be55666d /loginutils
parent77bb33c47420546ffb0e6f0e92e32e910b092bf0 (diff)
downloadbusybox-39e75106640e17d824c6da00b20ad6d76ede91c5.tar.gz
more destroy potential overflow for x86_64.
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/login.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index 35f9e4a9c..0f4b9ad9f 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -466,9 +466,11 @@ static void checkutmp(int picky)
static void setutmp(const char *name, const char *line ATTRIBUTE_UNUSED)
{
+ time_t t_tmp = (time_t)utent.ut_time;
+
utent.ut_type = USER_PROCESS;
strncpy(utent.ut_user, name, sizeof utent.ut_user);
- time((time_t*)&utent.ut_time);
+ time(&t_tmp);
/* other fields already filled in by checkutmp above */
setutent();
pututline(&utent);