# HG changeset patch # User jwe # Date 1201030191 0 # Node ID 8433bb7865bd651a12405b4cdbf18372affb9a50 # Parent e9b2e44f9341a1b7e8fb1c93724761d9ee0603fb [project @ 2008-01-22 19:29:51 by jwe] diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2008-01-22 Michael Goffioul + + * oct-time.cc (octave_base_tim::init): Validate pointer argument; + this fixes the "localtime(-1)" crash under Windows. + 2008-01-18 John W. Eaton * dMatrix.cc (solve_singularity_warning): New function. diff --git a/liboctave/oct-time.cc b/liboctave/oct-time.cc --- a/liboctave/oct-time.cc +++ b/liboctave/oct-time.cc @@ -291,6 +291,9 @@ void octave_base_tm::init (void *p) { + if (! p) + return; + struct tm *t = static_cast (p); tm_sec = t->tm_sec;