From 2f33effcdc4f21fec8da9921044de0d124709e80 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Fri, 30 May 2014 09:06:08 +0200 Subject: [PATCH] More ITS#7793 Check key->mv_size with MDB_CURRENT. Since non-NULL key must be provided now. --- libraries/liblmdb/mdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 55b8a1dff1..b04c9206db 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -5825,7 +5825,7 @@ mdb_cursor_put(MDB_cursor *mc, MDB_val *key, MDB_val *data, if (mc->mc_txn->mt_flags & (MDB_TXN_RDONLY|MDB_TXN_ERROR)) return (mc->mc_txn->mt_flags & MDB_TXN_RDONLY) ? EACCES : MDB_BAD_TXN; - if (flags != MDB_CURRENT && key->mv_size-1 >= ENV_MAXKEY(env)) + if (key->mv_size-1 >= ENV_MAXKEY(env)) return MDB_BAD_VALSIZE; #if SIZE_MAX > MAXDATASIZE -- 2.39.5