[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: gnats-bugs%NetBSD.org@localhost, lib-bug-people%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost, n54%gmx.com@localhost
Subject: Re: lib/49429: Import strtonum(3)
Date: Sat, 27 Dec 2014 09:57:34 -0500
On Dec 27, 3:10am, jnemeth%cue.bc.ca@localhost (John Nemeth) wrote:
-- Subject: Re: lib/49429: Import strtonum(3)
| char *ep;
| int rep;
| if (*eptr == NULL)
| eptr = &ep;
| if (rerror == NULL)
| rerror = &rep;
| With this code, you have the possibility of returning pointers
| to the stack. You should declare ep and rep as static. Otherwise,
| strtoi() looks good.
That would make things worse for threaded programs, and it is only
a concern for eptr.
Main Index |
Thread Index |