diff --git a/ChangeLog b/ChangeLog index aa72d20f..e3536db2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-04-05 Nicolas François + + * src/useradd.c: Set errno to 0 before calling strtol. + 2009-04-05 Nicolas François * libmisc/isexpired.c: If there are no shadow entry, there is no diff --git a/src/useradd.c b/src/useradd.c index 8ae84249..e90108ed 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -286,6 +286,7 @@ static long get_number (const char *numstr) long val; char *endptr; + errno = 0; val = strtol (numstr, &endptr, 10); if (('\0' == *numstr) || ('\0' != *endptr) || (ERANGE == errno)) { fprintf (stderr,