]> git.sur5r.net Git - openldap/commitdiff
Fix malloc of referral pointer array.
authorKurt Zeilenga <kurt@openldap.org>
Wed, 8 Mar 2000 17:37:49 +0000 (17:37 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 8 Mar 2000 17:37:49 +0000 (17:37 +0000)
servers/slapd/result.c

index cbd50098a9f3ef10d78ea799c12021a959ad4800..ad2f22afb9fac48a4f13fe6a91b285906cd461d5 100644 (file)
@@ -144,7 +144,7 @@ struct berval **get_entry_referrals(
 
        if( i < 1 ) return NULL;
 
-       refs = ch_malloc( i + 1 );
+       refs = ch_malloc( (i + 1) * sizeof(struct berval *));
 
        for( i=0, j=0; attr->a_vals[i] != NULL; i++ ) {
                unsigned k;