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:
Love Hörnquist Åstrand
2006-12-04 23:41:18 +00:00
parent 623e559f60
commit 238e717568
2 changed files with 2 additions and 0 deletions

View File

@@ -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");