aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/index.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-11-30 11:57:54 +0100
committerBjörn Gustavsson <[email protected]>2017-11-30 11:57:54 +0100
commit6fb6f4222f2cf924cbb9174d33c3b3190cfe52f2 (patch)
tree124498af9e9a04f37536cfcd8911ebe2e752a673 /erts/emulator/beam/index.c
parentfadc3d671d2edcf15b87719f350451c32c1f4bbb (diff)
parent3b3a617453af3ea5a731516585888c2373825a1d (diff)
downloadotp-6fb6f4222f2cf924cbb9174d33c3b3190cfe52f2.tar.gz
otp-6fb6f4222f2cf924cbb9174d33c3b3190cfe52f2.tar.bz2
otp-6fb6f4222f2cf924cbb9174d33c3b3190cfe52f2.zip
Merge branch 'maint'
* maint: Fix max atom size overflow on 64-bits Erlang by lowering the MAX_ATOM_TABLE_SIZE Fix integer overflow when set a large maximum value for atom table
Diffstat (limited to 'erts/emulator/beam/index.c')
-rw-r--r--erts/emulator/beam/index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/index.c b/erts/emulator/beam/index.c
index 93d1111904..be1771b037 100644
--- a/erts/emulator/beam/index.c
+++ b/erts/emulator/beam/index.c
@@ -58,7 +58,7 @@ IndexTable*
erts_index_init(ErtsAlcType_t type, IndexTable* t, char* name,
int size, int limit, HashFunctions fun)
{
- Uint base_size = ((limit+INDEX_PAGE_SIZE-1)/INDEX_PAGE_SIZE)*sizeof(IndexSlot*);
+ Uint base_size = (((Uint)limit+INDEX_PAGE_SIZE-1)/INDEX_PAGE_SIZE)*sizeof(IndexSlot*);
hash_init(type, &t->htable, name, 3*size/4, fun);
t->size = 0;