From f88449bcba767cc3cb4e250be87ea3e800e5c456 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 5 Mar 2007 16:18:41 +0000 Subject: [PATCH] fix str2anlist handling of undefined objects (ITS#4854) --- servers/slapd/ad.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index a48c7bdc39..af487b29f3 100644 --- a/servers/slapd/ad.c +++ b/servers/slapd/ad.c @@ -906,12 +906,14 @@ str2anlist( AttributeName *an, char *in, const char *brkstr ) } an = ch_realloc( an, ( i + j + 1 ) * sizeof( AttributeName ) ); - BER_BVZERO( &an[i + j].an_name ); anew = an + i; for ( s = ldap_pvt_strtok( str, brkstr, &lasts ); s != NULL; s = ldap_pvt_strtok( NULL, brkstr, &lasts ) ) { + /* put a stop mark */ + BER_BVZERO( &anew[1].an_name ); + anew->an_desc = NULL; anew->an_oc = NULL; anew->an_oc_exclude = 0; -- 2.39.5