diff --git a/src/core.c b/src/core.c index 42618705..b907e402 100644 --- a/src/core.c +++ b/src/core.c @@ -4701,7 +4701,8 @@ static __inline void mdbx_meta_update_end(const MDBX_env *env, MDBX_meta *meta, static __inline void mdbx_meta_set_txnid(const MDBX_env *env, MDBX_meta *meta, txnid_t txnid) { - mdbx_assert(env, meta < METAPAGE(env, 0) || meta > METAPAGE_END(env)); + mdbx_assert(env, !env->me_map || meta < METAPAGE(env, 0) || + meta >= METAPAGE_END(env)); (void)env; /* update inconsistent since this function used ONLY for filling meta-image * for writing, but not the actual meta-page */ diff --git a/test/keygen.cc b/test/keygen.cc index a941e3ae..183dd467 100644 --- a/test/keygen.cc +++ b/test/keygen.cc @@ -410,8 +410,8 @@ void __hot maker::mk_continue(const serial_t serial, const essentials ¶ms, assert(out.value.iov_len <= params.maxlen); assert(out.value.iov_len >= length(serial)); assert(out.value.iov_base >= out.bytes); - assert((uint8_t *)out.value.iov_base + out.value.iov_len <= - out.bytes + out.limit); + assert((char *)out.value.iov_base + out.value.iov_len <= + (char *)&out.bytes + out.limit); } void log_pair(logging::loglevel level, const char *prefix, const buffer &key,