aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2018-04-24 10:25:41 +0200
committerGitHub <[email protected]>2018-04-24 10:25:41 +0200
commite9134d6ac5ee7efa597fe5887ce030cb25a19227 (patch)
treef6238f698925ce81c8d4a1a3dd306f7d880eaadd
parent10f6147fa54c0d8a1c4add6fcbc7ac1f5fcc5b08 (diff)
parentbd31798262cd20354e64cca8654b0781b33d7ede (diff)
downloadotp-e9134d6ac5ee7efa597fe5887ce030cb25a19227.tar.gz
otp-e9134d6ac5ee7efa597fe5887ce030cb25a19227.tar.bz2
otp-e9134d6ac5ee7efa597fe5887ce030cb25a19227.zip
mikpe/erl_interface-bad-memset/PT-1796/OTP-15033
erl_interface: fix bad memset
-rw-r--r--lib/erl_interface/src/legacy/erl_marshal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/erl_interface/src/legacy/erl_marshal.c b/lib/erl_interface/src/legacy/erl_marshal.c
index caa171858d..6435754823 100644
--- a/lib/erl_interface/src/legacy/erl_marshal.c
+++ b/lib/erl_interface/src/legacy/erl_marshal.c
@@ -107,7 +107,7 @@ static int init_cmp_num_class_p=1; /* initialize array, the first time */
void erl_init_marshal(void)
{
if (init_cmp_array_p) {
- memset(cmp_array, 0, CMP_ARRAY_SIZE);
+ memset(cmp_array, 0, sizeof cmp_array);
cmp_array[ERL_SMALL_INTEGER_EXT] = ERL_NUM_CMP;
cmp_array[ERL_INTEGER_EXT] = ERL_NUM_CMP;
cmp_array[ERL_FLOAT_EXT] = ERL_NUM_CMP;