diff options
author | vodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-01-31 11:19:12 +0000 |
---|---|---|
committer | vodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-01-31 11:19:12 +0000 |
commit | 6be02ebeba05841958062de450b2c82774dd04b6 (patch) | |
tree | 79e01d58d514946221b97b89209c7065be55666d | |
parent | 7d1ec35a57352c41a4f2046d3c6cf709bba2153d (diff) | |
download | busybox-w32-6be02ebeba05841958062de450b2c82774dd04b6.tar.gz busybox-w32-6be02ebeba05841958062de450b2c82774dd04b6.tar.bz2 busybox-w32-6be02ebeba05841958062de450b2c82774dd04b6.zip |
more destroy potential overflow for x86_64.
git-svn-id: svn://busybox.net/trunk/busybox@13753 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | loginutils/login.c | 4 |
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) | |||
466 | 466 | ||
467 | static void setutmp(const char *name, const char *line ATTRIBUTE_UNUSED) | 467 | static void setutmp(const char *name, const char *line ATTRIBUTE_UNUSED) |
468 | { | 468 | { |
469 | time_t t_tmp = (time_t)utent.ut_time; | ||
470 | |||
469 | utent.ut_type = USER_PROCESS; | 471 | utent.ut_type = USER_PROCESS; |
470 | strncpy(utent.ut_user, name, sizeof utent.ut_user); | 472 | strncpy(utent.ut_user, name, sizeof utent.ut_user); |
471 | time((time_t*)&utent.ut_time); | 473 | time(&t_tmp); |
472 | /* other fields already filled in by checkutmp above */ | 474 | /* other fields already filled in by checkutmp above */ |
473 | setutent(); | 475 | setutent(); |
474 | pututline(&utent); | 476 | pututline(&utent); |