Commit cce2f372 authored by Howard Chu's avatar Howard Chu Committed by Quanah Gibson-Mount
Browse files

ITS#7527 add missing error checks for corrupt index

parent 1123e379
...@@ -505,9 +505,17 @@ mdb_idl_insert_keys( ...@@ -505,9 +505,17 @@ mdb_idl_insert_keys(
if ( id < lo || id > hi ) { if ( id < lo || id > hi ) {
/* position on lo */ /* position on lo */
rc = mdb_cursor_get( cursor, &key, &data, MDB_NEXT_DUP ); rc = mdb_cursor_get( cursor, &key, &data, MDB_NEXT_DUP );
if ( rc != 0 ) {
err = "c_get lo";
goto fail;
}
if ( id > hi ) { if ( id > hi ) {
/* position on hi */ /* position on hi */
rc = mdb_cursor_get( cursor, &key, &data, MDB_NEXT_DUP ); 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_size = sizeof(ID);
data.mv_data = &id; data.mv_data = &id;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment