]> git.sur5r.net Git - openldap/commitdiff
Fix desc not NULL bugs
authorKurt Zeilenga <kurt@openldap.org>
Tue, 16 May 2000 21:44:54 +0000 (21:44 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 16 May 2000 21:44:54 +0000 (21:44 +0000)
servers/slapd/compare.c
servers/slapd/filter.c
servers/slapd/schema_init.c

index d379cbf3b6149585da6c427408055056ddbc103d..86a7d9bdc9a177b27cfc5d15beb5832fb5ad18e6 100644 (file)
@@ -98,6 +98,7 @@ do_compare(
        }
 
 #ifdef SLAPD_SCHEMA_NOT_COMPAT
+       ava.aa_desc = NULL;
        rc = slap_bv2ad( &desc, &ava.aa_desc, &text );
        if( rc != LDAP_SUCCESS ) {
                send_ldap_result( conn, op, rc, NULL,
index 33d7d996f4c0283e7a3b2d5fdc92dd3205a1df29..58435431653e6dd0b5a1ef4b767f88c7b48a8bc1 100644 (file)
@@ -372,6 +372,7 @@ get_substring_filter(
        }
 
 #ifdef SLAPD_SCHEMA_NOT_COMPAT
+       f->f_sub_desc = NULL;
        rc = slap_bv2ad( &type, &f->f_sub_desc, text );
 
        ch_free( type.bv_val );
index f04e4ebbca7fe0a2e8c4614b1c1ce2f15790d3d7..64c88b0b226d8ab3205ad5642cdced17ab9cf676 100644 (file)
@@ -688,10 +688,14 @@ schema_prep( void )
 
 #ifdef SLAPD_SCHEMA_NOT_COMPAT
        for( i=0; ad_map[i].ssm_type; i++ ) {
-               int rc = slap_str2ad( ad_map[i].ssm_type,
-                       (AttributeDescription **)
-                               &(((char *) &slap_schema)[ad_map[i].ssm_offset]),
-                       &text);
+               int rc;
+
+               AttributeDescription ** adp = (AttributeDescription **)
+                       &(((char *) &slap_schema)[ad_map[i].ssm_offset]);
+
+               *adp = NULL;
+
+               rc = slap_str2ad( ad_map[i].ssm_type, adp, &text );
 
                if( rc != LDAP_SUCCESS ) {
                        fprintf( stderr,