From: Kurt Zeilenga Date: Tue, 6 Apr 2004 21:54:07 +0000 (+0000) Subject: delete from dn2id database bug in back-ldbm/idl.c (ITS#3046) X-Git-Tag: OPENLDAP_REL_ENG_2_2_BP~116 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dd726c5b6f95b596f35fe557d479704d3f4eb7dd;p=openldap delete from dn2id database bug in back-ldbm/idl.c (ITS#3046) Suggested fix provided by Wout van Albada --- 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;