diff options
author | Björn Gustavsson <[email protected]> | 2017-11-30 11:57:54 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-11-30 11:57:54 +0100 |
commit | 6fb6f4222f2cf924cbb9174d33c3b3190cfe52f2 (patch) | |
tree | 124498af9e9a04f37536cfcd8911ebe2e752a673 /erts/emulator/beam/index.c | |
parent | fadc3d671d2edcf15b87719f350451c32c1f4bbb (diff) | |
parent | 3b3a617453af3ea5a731516585888c2373825a1d (diff) | |
download | otp-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.c | 2 |
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; |