MDB_VL32 more for 1ba5adb2ec

fix 32bit overflow in set_mapsize
rawpart
Howard Chu 9 years ago
parent 8f88b1b0ba
commit 6f653ca205
  1. 2
      libraries/liblmdb/mdb.c

@ -4272,7 +4272,7 @@ mdb_env_set_mapsize(MDB_env *env, mdb_size_t size)
size = meta->mm_mapsize; size = meta->mm_mapsize;
{ {
/* Silently round up to minimum if the size is too small */ /* Silently round up to minimum if the size is too small */
size_t minsize = (meta->mm_last_pg + 1) * env->me_psize; mdb_size_t minsize = (meta->mm_last_pg + 1) * env->me_psize;
if (size < minsize) if (size < minsize)
size = minsize; size = minsize;
} }

Loading…
Cancel
Save