mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-07 07:30:57 -05:00
Better handling of missing entries
Treat zero-length entries properly (as missing entries) in entry_next() and entry_get_int().
This commit is contained in:
parent
88fad0dd41
commit
e4ec2be93d
1 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue