From: Howard Chu Date: Mon, 14 Jan 2013 21:46:25 +0000 (-0800) Subject: ITS#7485 more size checks X-Git-Tag: OPENLDAP_REL_ENG_2_4_34~55^2~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1a0d02c4c40bb869e8179192de10f8fbad60b1e2;p=openldap ITS#7485 more size checks --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index cae20de9ed..7cb7dc5995 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -4809,6 +4809,9 @@ mdb_cursor_put(MDB_cursor *mc, MDB_val *key, MDB_val *data, if (key->mv_size == 0 || key->mv_size > MDB_MAXKEYSIZE) return EINVAL; + if (F_ISSET(mc->mc_db->md_flags, MDB_DUPSORT) && data->mv_size > MDB_MAXKEYSIZE) + return EINVAL; + DPRINTF("==> put db %u key [%s], size %zu, data size %zu", mc->mc_dbi, DKEY(key), key ? key->mv_size:0, data->mv_size);