From d1f5cd0286e5e4c9a503924acc466f57f709e649 Mon Sep 17 00:00:00 2001 From: pscott Date: Thu, 22 Apr 2021 11:40:12 +0200 Subject: [PATCH] Fix destinationLen computing --- src_plugins/eth2/eth2_plugin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src_plugins/eth2/eth2_plugin.c b/src_plugins/eth2/eth2_plugin.c index 66793d5..572df0f 100644 --- a/src_plugins/eth2/eth2_plugin.c +++ b/src_plugins/eth2/eth2_plugin.c @@ -47,7 +47,8 @@ static int check_deposit_contract(ethPluginInitContract_t *msg) { &global_sha3, chainConfig); - uint8_t destinationLen = strlen(destinationAddress); + uint8_t destinationLen = strlen(destinationAddress) + 1; // Adding one to account for \0. + // Ensure address is in lowercase, to match DEPOSIT_CONTRACT_ADDRESS' case. to_lowercase(destinationAddress, destinationLen);