mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-18 11:05:48 +08:00
ITS#7527 add missing error checks for corrupt index
This commit is contained in:
parent
c6a4982793
commit
f827aa683e
@ -505,9 +505,17 @@ mdb_idl_insert_keys(
|
||||
if ( id < lo || id > hi ) {
|
||||
/* position on lo */
|
||||
rc = mdb_cursor_get( cursor, &key, &data, MDB_NEXT_DUP );
|
||||
if ( rc != 0 ) {
|
||||
err = "c_get lo";
|
||||
goto fail;
|
||||
}
|
||||
if ( id > hi ) {
|
||||
/* position on hi */
|
||||
rc = mdb_cursor_get( cursor, &key, &data, MDB_NEXT_DUP );
|
||||
if ( rc != 0 ) {
|
||||
err = "c_get hi";
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
data.mv_size = sizeof(ID);
|
||||
data.mv_data = &id;
|
||||
|
Loading…
Reference in New Issue
Block a user