]> git.sur5r.net Git - openldap/commitdiff
bv2ad expects desc pointer to be NULL if unallocated
authorKurt Zeilenga <kurt@openldap.org>
Tue, 16 May 2000 20:50:49 +0000 (20:50 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 16 May 2000 20:50:49 +0000 (20:50 +0000)
servers/slapd/ava.c
servers/slapd/filter.c

index 8b42b7eb6d999356f25bbedd55b4248f8d1f8247..5493cb2be3fd15355697259d225a3527a0631840 100644 (file)
@@ -48,6 +48,7 @@ get_ava(
        }
 
        aa = ch_malloc( sizeof( AttributeAssertion ) );
+       aa->aa_desc = NULL;
 
        rc = slap_bv2ad( &type, &aa->aa_desc, &text );
 
@@ -59,6 +60,7 @@ get_ava(
        }
 
        aa->aa_value = value;
+       *ava = aa;
 
        return LDAP_SUCCESS;
 }
index 9d7e7187c01a4b3671144ed02fe40587d94c073d..072414800c503ac365c66f35c2d13ddcaec78281 100644 (file)
@@ -99,6 +99,8 @@ get_filter(
                        break;
                }
 
+               assert( f->f_ava != NULL );
+
 #ifdef SLAPD_SCHEMA_NOT_COMPAT
                *fstr = ch_malloc( sizeof("(=)")
                        + f->f_av_desc->ad_cname->bv_len