Process and user ID arguments must be treated as decimal integers,

not octal or hex. This is the way it was before revision 1.10.

PR:		36950
Submitted by:	Peter Avalos <pavalos@theshell.com>
This commit is contained in:
Tim J. Robbins 2002-05-16 23:55:35 +00:00
parent ae5a682066
commit 9e49944008
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96764

View file

@ -156,7 +156,7 @@ getnum(const char *com, const char *str, int *val)
char *ep;
errno = 0;
v = strtol(str, &ep, NULL);
v = strtol(str, &ep, 10);
if (v < INT_MIN || v > INT_MAX || errno == ERANGE) {
warnx("%s argument %s is out of range.", com, str);
return (1);