Skip to content

Commit

Permalink
Now properly cleans up the trusted name informations when an error oc…
Browse files Browse the repository at this point in the history
…cured during its handling
  • Loading branch information
apaillier-ledger committed Jan 29, 2025
1 parent 9b0a5c9 commit b7e5771
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src_features/provideTrustedName/cmd_provide_trusted_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ static bool handle_tlv_payload(const uint8_t *payload, uint16_t size, bool to_fr
if (to_free) mem_dealloc(size);
if (!parsing_success || !verify_struct(&ctx) || !verify_signature(&ctx)) {
roll_challenge(); // prevent brute-force guesses
explicit_bzero(&g_trusted_name_info, sizeof(g_trusted_name_info));
return false;
}
PRINTF("Registered : %s => %.*h\n",
Expand Down

0 comments on commit b7e5771

Please sign in to comment.