NetBSD-Bugs archive

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

Re: lib/49429: Import strtonum(3)



On Sat, Dec 27, 2014 at 03:10:01AM +0000, John Nemeth wrote:
>  	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.

Eh, no. The pointers are not returned at all.

Joerg


Home | Main Index | Thread Index | Old Index