From: Howard Chu Date: Fri, 28 Dec 2012 19:26:26 +0000 (-0800) Subject: Better handling of missing entries X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e4ec2be93d675b120f1bffbff497d9ed8628c2a6;p=openldap Better handling of missing entries Treat zero-length entries properly (as missing entries) in entry_next() and entry_get_int(). --- diff --git a/servers/slapd/back-mdb/tools.c b/servers/slapd/back-mdb/tools.c index b444e3a53f..6aae331484 100644 --- a/servers/slapd/back-mdb/tools.c +++ b/servers/slapd/back-mdb/tools.c @@ -231,6 +231,9 @@ next:; previd = *(ID *)key.mv_data; id = previd; + if ( !data.mv_size ) + goto next; + if ( tool_filter || tool_base ) { static Operation op = {0}; static Opheader ohdr = {0}; @@ -326,6 +329,10 @@ mdb_tool_entry_get_int( BackendDB *be, ID id, Entry **ep ) goto done; } } + if ( !data.mv_size ) { + rc = LDAP_NO_SUCH_OBJECT; + goto done; + } op.o_hdr = &ohdr; op.o_bd = be;