From 58f4ffca5948823f65a9324384cbdcd56bd6df3b Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 22 Sep 2001 05:35:52 +0000 Subject: [PATCH] Fix another SEGV from previous patch. --- servers/slapd/back-ldbm/idl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-ldbm/idl.c b/servers/slapd/back-ldbm/idl.c index a3fa50eb77..9196018aa7 100644 --- a/servers/slapd/back-ldbm/idl.c +++ b/servers/slapd/back-ldbm/idl.c @@ -306,7 +306,7 @@ idl_find( ID id ) { - int lo=0, hi=ID_BLOCK_NIDS(b)-1, nr; + int lo=0, hi=ID_BLOCK_NIDS(b)-1, nr=0; for (;lo<=hi;) { @@ -802,7 +802,7 @@ idl_insert( ID_BLOCK **idl, ID id, unsigned int maxids ) if ( ID_BLOCK_ID(*idl, i) == id ) { return( 2 ); /* already there */ } - if ( ID_BLOCK_ID(*idl, i) < id ) + if ( ID_BLOCK_NIDS(*idl) && ID_BLOCK_ID(*idl, i) < id ) i++; /* do we need to make room for it? */ -- 2.39.5