more destroy potential overflow for x86_64.

This commit is contained in:
"Vladimir N. Oleynik" 2006-01-31 11:19:12 +00:00
parent 77bb33c474
commit 39e7510664

View File

@ -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);