From 94bcff33cac227683dcbc052777c42c6c35a1c06 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 5 Mar 2007 16:19:00 +0000 Subject: [PATCH] fix str2anlist handling of undefined objects (ITS#4854) --- CHANGES | 1 + servers/slapd/ad.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index b33c4fb28b..b90a548580 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,7 @@ OpenLDAP 2.3 Change Log OpenLDAP 2.3.35 Engineering Fixed entry consistency check in str2entry2 (ITS#4852) + Fixed str2anlist handling of undefined attrs/OCs (ITS#4854) Fixed slapd-bdb/hdb startup with missing shm env (ITS#4851) Fixed slapd-meta/slapo-rwm filter mapping Fixed slapo-refint config message (ITS#4853) diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index 7316d4cf1c..779e565c0a 100644 --- a/servers/slapd/ad.c +++ b/servers/slapd/ad.c @@ -888,12 +888,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.2