From 7673a7235e10ed27dc30a90415f65f2372478d9b Mon Sep 17 00:00:00 2001 From: "mcs%pearlcrescent.com" Date: Wed, 16 Jun 2004 13:18:48 +0000 Subject: [PATCH] Fix bug # 246694 - 64-bit build: incorrect handling of password policy response. The 'i' format specifier to ber_scanf() requires a long arg, not int. git-svn-id: svn://10.0.0.236/trunk@157961 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/directory/c-sdk/ldap/clients/tools/common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mozilla/directory/c-sdk/ldap/clients/tools/common.c b/mozilla/directory/c-sdk/ldap/clients/tools/common.c index 6d746150351..c1faf7b9441 100644 --- a/mozilla/directory/c-sdk/ldap/clients/tools/common.c +++ b/mozilla/directory/c-sdk/ldap/clients/tools/common.c @@ -1501,7 +1501,8 @@ parse_result( LDAP *ld, LDAPMessage *res, struct berval **servercredp, if ( 0 == strcmp( ctrls[i]->ldctl_oid, LDAP_X_CONTROL_PWPOLICY_RESPONSE )) { unsigned long tag1=0, tag2=0, tag3=0; - int warnvalue=0, grclogins=-1, secsleft=-1, errvalue=-1; + long warnvalue=0; + int grclogins=-1, secsleft=-1, errvalue=-1; static int err2str_size = sizeof(pwpolicy_err2str)/sizeof(pwpolicy_err2str[0]); if ( ( ber = ber_init(&(ctrls[i]->ldctl_value)) ) == NULL ) { @@ -1523,10 +1524,10 @@ parse_result( LDAP *ld, LDAPMessage *res, struct berval **servercredp, } switch (tag2) { case LDAP_TAG_PWP_SECSLEFT: - secsleft = warnvalue; + secsleft = (int)warnvalue; break; case LDAP_TAG_PWP_GRCLOGINS: - grclogins = warnvalue; + grclogins = (int)warnvalue; break; default: /* error */