Mercurial > hg > octave-nkf
changeset 13982:6cdfbe90e2ab
remove kluge for apparent libc bug that is really a valgrind bug
* oct-time.cc (octave_strptime::init): Simply pass str.c_str () to
strptime.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 03 Dec 2011 03:30:37 -0500 |
parents | 5f8bc2f145f5 |
children | 7dd7cccf0757 |
files | liboctave/oct-time.cc |
diffstat | 1 files changed, 1 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/oct-time.cc +++ b/liboctave/oct-time.cc @@ -267,19 +267,7 @@ t.tm_zone = ps; #endif - // FIXME -- the following kluge avoids a memory access problem with - // strptime in some versions of GNU libc. - // http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=650714 - - const char *pstr = str.c_str (); - size_t len = str.length (); - const int extra = 128; - OCTAVE_LOCAL_BUFFER (char, p, len + extra); - char *pp = p; - for (size_t i = 0; i < len; i++) - *pp++ = *pstr++; - for (size_t i = len; i < extra; i++) - *pp++ = 0; + const char *p = str.c_str (); char *q = gnulib::strptime (p, fmt.c_str (), &t);