Date: Thu, 13 May 2004 22:21:23 -0400 From: "Brandon S. Allbery KF8NH" <allbery@ece.cmu.edu> To: Larry Rosenman <ler@lerctr.org> Cc: freebsd-current@freebsd.org Subject: Re: strtod vs NAN? Message-ID: <1084501282.6477.11.camel@rushlight.kf8nh.com> In-Reply-To: <9AE9B859FD197218F21D81D0@lerlaptop.lerctr.org> References: <9AE9B859FD197218F21D81D0@lerlaptop.lerctr.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2004-05-13 at 22:14, Larry Rosenman wrote: > char **ptr; > > num=strtod(input,ptr); Since ptr is uninitialized, strtod() is trying to store a pointer into random memory. You probably want to say this instead: char *ptr; num = strtod(input, &ptr); -- brandon s. allbery [linux,solaris,freebsd,perl] allbery@kf8nh.com system administrator [WAY too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon univ. KF8NH
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1084501282.6477.11.camel>