[BusyBox] Serious bug in udhcpc

Bastian Blank waldi at debian.org
Mon Apr 21 20:27:47 UTC 2003


On Mon, Apr 21, 2003 at 11:46:46AM -0700, Russ Dill wrote:
> the value that it returns is seconds *since* epoch, and since it returns
> a signed long, dates larger than 0x7FFFFFFF (sometime in 2038) don't
> make sense. Its a broken system, in no way should the time ever have
> been set to that value.

it's normal behaviour for a linux kernel on systems without a hardware
clock, it sets the time to some random value.

> Basically, I don't want to add complex code to account ofr seriously
> broken systems. Maybe add a if (time(0) < 0) printf("fscked time\n"); if
> you are concerned about it.

cast the value to unsigned as proposed for supporting dates after 2037.

bastian

-- 
You're dead, Jim.
		-- McCoy, "Amok Time", stardate 3372.7


More information about the busybox mailing list