From: nekral-guest Date: Sun, 5 Apr 2009 22:02:50 +0000 (+0000) Subject: * src/useradd.c: Set errno to 0 before calling strtol. X-Git-Tag: 4.1.3~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1cac18ac3dd413835a9c4b2c780f3abb48dd838;p=shadow * src/useradd.c: Set errno to 0 before calling strtol. --- 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,