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:
@@ -1171,6 +1171,7 @@ LDAP_message2entry(krb5_context context, HDB * db, LDAPMessage * msg,
|
||||
|
||||
values = ldap_get_values(HDB2LDAP(db), msg, "krb5KDCFlags");
|
||||
if (values != NULL) {
|
||||
errno = 0;
|
||||
tmp = strtoul(values[0], (char **) NULL, 10);
|
||||
if (tmp == ULONG_MAX && errno == ERANGE) {
|
||||
krb5_set_error_string(context, "strtoul: could not convert flag");
|
||||
|
Reference in New Issue
Block a user