From 61424e7907ee64d996322eb3ede91309fdc29006 Mon Sep 17 00:00:00 2001 From: TamtamHero <10632523+TamtamHero@users.noreply.github.com> Date: Mon, 30 Nov 2020 15:44:11 +0100 Subject: [PATCH] Fix wrong size in memmove --- src_plugins/compound/compound_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src_plugins/compound/compound_plugin.c b/src_plugins/compound/compound_plugin.c index 4985bc6..f67041c 100644 --- a/src_plugins/compound/compound_plugin.c +++ b/src_plugins/compound/compound_plugin.c @@ -102,7 +102,7 @@ void compound_plugin_call(int message, void *parameters) { if(context->selectorIndex == CETH_MINT){ // ETH amount 0x1234 is stored 0x12340000...000 instead of 0x00....001234, so we strip the following zeroes when copying memset(context->amount, 0, sizeof(context->amount)); - memmove(context->amount + sizeof(context->amount) - msg->pluginSharedRO->txContent->value.length, msg->pluginSharedRO->txContent->value.value, 32); + memmove(context->amount + sizeof(context->amount) - msg->pluginSharedRO->txContent->value.length, msg->pluginSharedRO->txContent->value.value, msg->pluginSharedRO->txContent->value.length); } PRINTF("compound plugin inititialized\n"); msg->result = ETH_PLUGIN_RESULT_OK;