From 30610c6f7000b2a175fff393b9c08a4e9d642a7f Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Sun, 31 Jul 2005 05:12:20 +0000 Subject: [PATCH] Fix logic error in slap_mods2entry() --- servers/slapd/add.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 ) {