Skip to content

Commit

Permalink
fix: I2
Browse files Browse the repository at this point in the history
  • Loading branch information
loicttn committed May 29, 2024
1 parent 392ed32 commit 24bab20
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/handle_init_contract.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ void handle_init_contract(ethPluginInitContract_t *msg) {
}
context->selectorIndex = index;

// check for overflow
if ((size_t) context->selectorIndex != index) {
PRINTF("Error: overflow detected on selector index!\n");
msg->result = ETH_PLUGIN_RESULT_ERROR;
return;
}

msg->result = ETH_PLUGIN_RESULT_OK;

switch (context->selectorIndex) {
Expand Down

0 comments on commit 24bab20

Please sign in to comment.