more destroy potential overflow for x86_64.
This commit is contained in:
parent
77bb33c474
commit
39e7510664
@ -466,9 +466,11 @@ static void checkutmp(int picky)
|
|||||||
|
|
||||||
static void setutmp(const char *name, const char *line ATTRIBUTE_UNUSED)
|
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;
|
utent.ut_type = USER_PROCESS;
|
||||||
strncpy(utent.ut_user, name, sizeof utent.ut_user);
|
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 */
|
/* other fields already filled in by checkutmp above */
|
||||||
setutent();
|
setutent();
|
||||||
pututline(&utent);
|
pututline(&utent);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user