Skip to content

Commit

Permalink
Merge pull request #38 from blooo-io/fix/LDG-655-audit-security-vulne…
Browse files Browse the repository at this point in the history
…rabilities
  • Loading branch information
n4l5u0r authored Jan 18, 2025
2 parents 0ecfe69 + 3720063 commit 25291b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ APPNAME = "StakeKit"
# Application version
APPVERSION_M = 1
APPVERSION_N = 3
APPVERSION_P = 1
APPVERSION_P = 2

include ethereum-plugin-sdk/standard_plugin.mk
5 changes: 3 additions & 2 deletions src/handle_provide_parameter.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ static void handle_angle_withdraw(ethPluginProvideParameter_t *msg, plugin_param
context->next_param = NONE;
break;
case NONE:
break;
default:
PRINTF("Param not supported\n");
msg->result = ETH_PLUGIN_RESULT_ERROR;
Expand Down Expand Up @@ -247,7 +248,7 @@ static void handle_claim_and_delegate(ethPluginProvideParameter_t *msg,
// Save 2 operator and 1 amount in the context.
// The first param is the old operator address saved in recipient.
// The second param is the new operator address saved in contract_address.
// The third param is the delegateVotePower saved in amount_received.
// The third param is the delegateVotePower saved in amount_sent.
static void handle_redelegate(ethPluginProvideParameter_t *msg, plugin_parameters_t *context) {
switch (context->next_param) {
case RECIPIENT: // Put the old operator address in recipient
Expand All @@ -261,7 +262,7 @@ static void handle_redelegate(ethPluginProvideParameter_t *msg, plugin_parameter
break;
case AMOUNT_SENT: // Skip shares and put the delegateVotePower in amount_sent
copy_parameter(context->amount_sent, msg->parameter, INT256_LENGTH);
context->next_param = AMOUNT_RECEIVED;
context->next_param = NONE;
break;
case NONE:
break;
Expand Down

0 comments on commit 25291b2

Please sign in to comment.