From: Luke Howard Date: Sun, 31 Jul 2005 05:12:20 +0000 (+0000) Subject: Fix logic error in slap_mods2entry() X-Git-Tag: OPENLDAP_AC_BP~136 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=30610c6f7000b2a175fff393b9c08a4e9d642a7f;p=openldap Fix logic error in slap_mods2entry() --- diff --git a/servers/slapd/add.c b/servers/slapd/add.c index 30af7693dd..392a6c68e2 100644 --- a/servers/slapd/add.c +++ b/servers/slapd/add.c @@ -395,12 +395,15 @@ slap_mods2entry( const char **text, char *textbuf, size_t textlen ) { - Attribute **tail = &(*e)->e_attrs; + Attribute **tail; if ( initial ) { - assert( *tail == NULL ); + assert( (*e)->e_attrs == NULL ); } + for ( tail = &(*e)->e_attrs; *tail != NULL; tail = &(*tail)->a_next ) + ; + *text = textbuf; for( ; mods != NULL; mods = mods->sml_next ) {