NetBSD-Bugs archive

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

Re: lib/49429: Import strtonum(3)



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

From: christos%zoulas.com@localhost (Christos Zoulas)
To: "Kamil Rytarowski" <n54%gmx.com@localhost>, gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: lib/49429: Import strtonum(3)
Date: Sat, 27 Dec 2014 09:55:48 -0500

 On Dec 27,  3:56am, n54%gmx.com@localhost ("Kamil Rytarowski") wrote:
 -- Subject: Re: lib/49429: Import strtonum(3)
 
 | If someone wants something over 10 and under 5 then there is no valid return value, and I was thinking of fallback to 0.
 
 Zero is worse than five. At least 5 is in range if we assume that the user
 swapped the values accidentally. Even if we checked and returned EINVAL
 in this case, my plan was to swap and do the range check on the swapped
 values.
 
 | 	if (*eptr == NULL)
 
 That's a bug, it should just check eptr.
 
 | Well this is applicative, with additional checks for #if HAVE_STRTONUM (and entry in configure.ac).
 
 Sure.
 
 | Thank you!
 
 Thanks for the feedback!
 
 christos
 


Home | Main Index | Thread Index | Old Index