diff --git a/libraries/liblmdb/CHANGES b/libraries/liblmdb/CHANGES index cf62eb48d6..c2e5ff672e 100644 --- a/libraries/liblmdb/CHANGES +++ b/libraries/liblmdb/CHANGES @@ -1,6 +1,6 @@ LMDB 0.9 Change Log -LMDB 0.9.20 Release (2017/01/11) +LMDB 0.9.20 Release Engineering Fix mdb_load with escaped plaintext (ITS#8558) Fix mdb_cursor_last / mdb_put interaction (ITS#8557) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index fdc36bf1cb..3f43e94b66 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -6345,19 +6345,10 @@ mdb_cursor_get(MDB_cursor *mc, MDB_val *key, MDB_val *data, rc = MDB_INCOMPATIBLE; break; } - if (!(mc->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED)) { - rc = EINVAL; - break; - } - if (mc->mc_xcursor->mx_cursor.mc_flags & C_EOF) { - MDB_cursor *mx = &mc->mc_xcursor->mx_cursor; - if (mx->mc_ki[mx->mc_top] >= NUMKEYS(mx->mc_pg[mx->mc_top])-1) { - rc = MDB_NOTFOUND; - break; - } - mx->mc_flags ^= C_EOF; - } rc = MDB_SUCCESS; + if (!(mc->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED) || + (mc->mc_xcursor->mx_cursor.mc_flags & C_EOF)) + break; goto fetchm; case MDB_NEXT_MULTIPLE: if (data == NULL) {