]> git.sur5r.net Git - openldap/commitdiff
MDB_VL32 more for 1ba5adb2ec262405f9207d6015d4f29eea548d25
authorHoward Chu <hyc@openldap.org>
Wed, 27 Jan 2016 11:48:22 +0000 (11:48 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 27 Jan 2016 11:48:22 +0000 (11:48 +0000)
fix 32bit overflow in set_mapsize

libraries/liblmdb/mdb.c

index be36d4967e6df0dc6505158e436d1d0383dc8444..41f7e25fcc2fdeab11affee3a0e161a3c875fb19 100644 (file)
@@ -4272,7 +4272,7 @@ mdb_env_set_mapsize(MDB_env *env, mdb_size_t size)
                        size = meta->mm_mapsize;
                {
                        /* 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)
                                size = minsize;
                }