svn commit: trunk/busybox/loginutils

vodz at busybox.net vodz at busybox.net
Tue Jan 31 11:19:13 UTC 2006


Author: vodz
Date: 2006-01-31 03:19:12 -0800 (Tue, 31 Jan 2006)
New Revision: 13753

Log:
more destroy potential overflow for x86_64.

Modified:
   trunk/busybox/loginutils/login.c


Changeset:
Modified: trunk/busybox/loginutils/login.c
===================================================================
--- trunk/busybox/loginutils/login.c	2006-01-31 11:16:40 UTC (rev 13752)
+++ trunk/busybox/loginutils/login.c	2006-01-31 11:19:12 UTC (rev 13753)
@@ -466,9 +466,11 @@
 
 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);




More information about the busybox-cvs mailing list