NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/31908



The following reply was made to PR bin/31908; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: Christopher Berardi <cberardi%natoufa.com@localhost>
Subject: Re: bin/31908
Date: Sat, 20 Feb 2010 23:52:29 +0000

 On Sat, Feb 20, 2010 at 10:35:02PM +0000, Christopher Berardi wrote:
  >     case 's':
  >         f = atof(optarg);
  >  -      if (f < 0 || (f == 0 && getuid() != 0))
  >  +      if (f < 0 || (f == 0 && getuid() != 0) || (f == HUGE_VAL))
 
 Better to use strtod() with proper error checking... plus this also
 wants an isnan() test.
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index