Clear errno before calling the strtol functions. From Paul Stoeber to
OpenBSD by Ray Lai and Björn Sandell. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19215 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -157,6 +157,7 @@ read_limits_conf(const char *file, const struct passwd *pwd)
|
||||
if(strcmp(args[3], "-") == 0) {
|
||||
value = RLIM_INFINITY;
|
||||
} else {
|
||||
errno = 0;
|
||||
value = strtol(args[3], &end, 10);
|
||||
if(*end != '\0') {
|
||||
syslog(LOG_ERR, "%s: line %d: bad value %s", file, lineno, args[3]);
|
||||
|
Reference in New Issue
Block a user