Jan. 30, 2010
9:22 p.m.
Robert Elz <kre <at> munnari.OZ.AU> writes:
locatime() can return NULL these days, and given a nonsense time value (which is quite likely under these circumstances), probably did, but asctime() doesn't expect anything but a valus "struct tm *" and will simply dereference NULL is NULL is returned from localtime() - instant core.
Ouch, that is a good one. I don't know if these are FreeBSD specific, but the following ones take the "struct tm *" without checking the values neither: * time1() via mktime(), gmtime(). * asctime_r(). Edwin