]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/options.c
Fix off by one bug
[openldap] / libraries / libldap / options.c
index 515f906b9845b2efa7bbef4cfd041c937347a8d5..041897494dc6c9fa1ae8140e4883b34a69962b0e 100644 (file)
@@ -465,7 +465,8 @@ ldap_set_option(
                        int rc = LDAP_OPT_SUCCESS;
 
                        if(host != NULL) {
-                               rc = ldap_url_parsehosts(&ludlist, host);
+                               rc = ldap_url_parsehosts( &ludlist, host,
+                                       lo->ldo_defport ? lo->ldo_defport : LDAP_PORT );
 
                        } else if(ld == NULL) {
                                /*