]> git.sur5r.net Git - openldap/commitdiff
ITS#8648 check result of ldap_int_initialize in ldap_{get,set}_option
authorRyan Tandy <ryan@nardis.ca>
Sun, 7 May 2017 20:16:00 +0000 (20:16 +0000)
committerRyan Tandy <ryan@nardis.ca>
Sun, 7 May 2017 20:16:25 +0000 (20:16 +0000)
libraries/libldap/options.c

index 7dcd4d2d974875e45390ea4640fa8ec07b0a2389..1705bd9fc7e213709f6d727915b04de19cf6fd66 100644 (file)
@@ -106,6 +106,8 @@ ldap_get_option(
 
        if( lo->ldo_valid != LDAP_INITIALIZED ) {
                ldap_int_initialize(lo, NULL);
+               if ( lo->ldo_valid != LDAP_INITIALIZED )
+                       return LDAP_LOCAL_ERROR;
        }
 
        if(ld != NULL) {
@@ -446,6 +448,8 @@ ldap_set_option(
 
        if( lo->ldo_valid != LDAP_INITIALIZED ) {
                ldap_int_initialize(lo, dbglvl);
+               if ( lo->ldo_valid != LDAP_INITIALIZED )
+                       return LDAP_LOCAL_ERROR;
        }
 
        if(ld != NULL) {