mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
delete from dn2id database bug in back-ldbm/idl.c (ITS#3046)
Suggested fix provided by Wout van Albada
This commit is contained in:
parent
0c2c38c02f
commit
dd726c5b6f
@ -952,13 +952,16 @@ idl_delete_key (
|
|||||||
*/
|
*/
|
||||||
cont_alloc( &data, &key );
|
cont_alloc( &data, &key );
|
||||||
#ifndef USE_INDIRECT_NIDS
|
#ifndef USE_INDIRECT_NIDS
|
||||||
for ( nids = 0; !ID_BLOCK_NOID(idl, nids); nids++ )
|
for ( nids = 0; !ID_BLOCK_NOID(idl, nids); nids++ ) {
|
||||||
; /* NULL */
|
; /* Empty */
|
||||||
|
}
|
||||||
|
|
||||||
for ( j = 0; j<nids; j++ )
|
for ( j = 0; j<nids; j++ )
|
||||||
#else
|
#else
|
||||||
nids = ID_BLOCK_NIDS(idl);
|
nids = ID_BLOCK_NIDS(idl);
|
||||||
for ( j = idl_find(idl, id); 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
|
#endif
|
||||||
{
|
{
|
||||||
ID_BLOCK *tmp;
|
ID_BLOCK *tmp;
|
||||||
|
Loading…
Reference in New Issue
Block a user