From: Hallvard Furuseth Date: Sat, 10 Dec 2016 21:00:31 +0000 (+0100) Subject: ITS#7377 Catch mdb_cursor_sibling() error X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=65e95ffccf512dd1514083bd5768f1595560eb53;p=openldap ITS#7377 Catch mdb_cursor_sibling() error --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 5a3a829629..42452c2894 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -9548,7 +9548,7 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno } else { /* find right page's left sibling */ mc->mc_ki[ptop] = mn.mc_ki[ptop]; - mdb_cursor_sibling(mc, 0); + rc = mdb_cursor_sibling(mc, 0); } } } else { @@ -9557,6 +9557,8 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno mn.mc_top++; } if (rc != MDB_SUCCESS) { + if (rc == MDB_NOTFOUND) /* improper mdb_cursor_sibling() result */ + rc = MDB_PROBLEM; goto done; } if (nflags & MDB_APPEND) {