From dd726c5b6f95b596f35fe557d479704d3f4eb7dd Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 6 Apr 2004 21:54:07 +0000 Subject: [PATCH] delete from dn2id database bug in back-ldbm/idl.c (ITS#3046) Suggested fix provided by Wout van Albada --- servers/slapd/back-ldbm/idl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/servers/slapd/back-ldbm/idl.c b/servers/slapd/back-ldbm/idl.c index d592732e48..f19ece31d0 100644 --- a/servers/slapd/back-ldbm/idl.c +++ b/servers/slapd/back-ldbm/idl.c @@ -952,13 +952,16 @@ idl_delete_key ( */ cont_alloc( &data, &key ); #ifndef USE_INDIRECT_NIDS - for ( nids = 0; !ID_BLOCK_NOID(idl, nids); nids++ ) - ; /* NULL */ + for ( nids = 0; !ID_BLOCK_NOID(idl, nids); nids++ ) { + ; /* Empty */ + } for ( j = 0; j= 0; j = -1) /* execute once */ + j = idl_find(idl, id); + if ( ID_BLOCK_ID(idl, j) > id ) j--; + for (; j>=0; j = -1 ) /* execute once */ #endif { ID_BLOCK *tmp; -- 2.39.5