diff options
author | Björn Gustavsson <[email protected]> | 2017-11-30 11:56:50 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2017-11-30 11:56:50 +0100 |
commit | 3b3a617453af3ea5a731516585888c2373825a1d (patch) | |
tree | 02cbf85a6597461a8626adbfd5a4fc7d574738ba /erts/emulator/beam/index.c | |
parent | 79f7815238673bbeea2b4551cc207768c348e5ce (diff) | |
parent | 864362749246d15355e904cf95248a634eebdfb7 (diff) | |
download | otp-3b3a617453af3ea5a731516585888c2373825a1d.tar.gz otp-3b3a617453af3ea5a731516585888c2373825a1d.tar.bz2 otp-3b3a617453af3ea5a731516585888c2373825a1d.zip |
Merge pull request #1633 from sunboshan/atom-size-fix
Fix integer overflow when set a large maximum value for atom table
OTP-14796
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 a1f6f54543..7bf1a032c1 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; |