From: Howard Chu Date: Sun, 15 Sep 2013 20:08:29 +0000 (-0700) Subject: ITS#7681 fix 18a07eb7c2dc33372455a6040984cd6b699b41a5 X-Git-Tag: OPENLDAP_REL_ENG_2_4_37~27^2~25 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=912e09fd04e0512e6f764176a4a0a2ab009c87d1;p=openldap ITS#7681 fix 18a07eb7c2dc33372455a6040984cd6b699b41a5 Set rc=0 when taking the SET_RANGE branch --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index e5313b0c85..e30d85c476 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -5231,9 +5231,10 @@ mdb_cursor_set(MDB_cursor *mc, MDB_val *key, MDB_val *data, if (!mc->mc_top) { /* There are no other pages */ mc->mc_ki[mc->mc_top] = 0; - if (op == MDB_SET_RANGE) + if (op == MDB_SET_RANGE) { + rc = 0; goto set1; - else + } else return MDB_NOTFOUND; } } @@ -5298,6 +5299,7 @@ set1: if (rc) { if (op == MDB_GET_BOTH || rc > 0) return MDB_NOTFOUND; + rc = 0; } } else {