From: Kurt Zeilenga Date: Wed, 8 Mar 2000 17:37:49 +0000 (+0000) Subject: Fix malloc of referral pointer array. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~3161 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9369b9daadd4e5505b7698fc110403ebe8cda30e;p=openldap Fix malloc of referral pointer array. --- diff --git a/servers/slapd/result.c b/servers/slapd/result.c index cbd50098a9..ad2f22afb9 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -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;