Jan. 30, 2010
11:37 p.m.
On Sat, 30 Jan 2010, Robert Elz wrote:
ctime() is (of course) just asctime(locatime(t))
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.
This code follows the C standard, so this bug is a defect in the standard. It has not been corrected in the latest committee draft. http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1425.pdf Tony. -- f.anthony.n.finch <dot@dotat.at> http://dotat.at/ GERMAN BIGHT HUMBER: SOUTHWEST 5 TO 7. MODERATE OR ROUGH. SQUALLY SHOWERS. MODERATE OR GOOD.