37
37
38
38
typedef struct {
39
39
signers_descriptor_t * signers ;
40
- uint8_t addess_count ;
40
+ uint8_t address_count ;
41
41
uint8_t sig_size ;
42
42
uint8_t * sig ;
43
43
cx_sha256_t hash_ctx ;
@@ -142,11 +142,11 @@ static bool handle_challenge(const s_tlv_data *data, s_signer_ctx *context) {
142
142
static bool handle_address (const s_tlv_data * data , s_signer_ctx * context ) {
143
143
CHECK_FIELD_LENGTH ("ADDRESS" , data -> length , ADDRESS_LENGTH );
144
144
CHECK_EMPTY_BUFFER ("ADDRESS" , data -> value , data -> length );
145
- if (context -> addess_count >= SAFE_DESC -> signers_count ) {
145
+ if (context -> address_count >= SAFE_DESC -> signers_count ) {
146
146
PRINTF ("Error: Too many addresses in Signer descriptor!\n" );
147
147
return false;
148
148
}
149
- COPY_FIELD (context -> signers -> data [context -> addess_count ++ ].address , data );
149
+ COPY_FIELD (context -> signers -> data [context -> address_count ++ ].address , data );
150
150
context -> rcv_flags |= SET_BIT (BIT_ADDRESS );
151
151
return true;
152
152
}
@@ -225,7 +225,7 @@ static void print_signer_info(const s_signer_ctx *context) {
225
225
226
226
PRINTF ("****************************************************************************\n" );
227
227
PRINTF ("[SAFE ACCOUNT] - Retrieved Signer Descriptor:\n" );
228
- for (i = 0 ; i < context -> addess_count ; i ++ ) {
228
+ for (i = 0 ; i < context -> address_count ; i ++ ) {
229
229
PRINTF ("[SAFE ACCOUNT] - Address[%d]: %.*h\n" ,
230
230
i ,
231
231
ADDRESS_LENGTH ,
@@ -250,7 +250,7 @@ static bool verify_signer_struct(const s_signer_ctx *context) {
250
250
PRINTF ("Error: Signature verification failed for Signer descriptor!\n" );
251
251
return false;
252
252
}
253
- if (context -> addess_count < SAFE_DESC -> signers_count ) {
253
+ if (context -> address_count < SAFE_DESC -> signers_count ) {
254
254
PRINTF ("Error: Too few addresses in Signer descriptor!\n" );
255
255
return false;
256
256
}
@@ -347,7 +347,6 @@ bool handle_signer_tlv_payload(const uint8_t *payload, uint16_t size) {
347
347
void clear_signer_descriptor (void ) {
348
348
if (SIGNER_DESC .data != NULL ) {
349
349
app_mem_free (SIGNER_DESC .data );
350
- SIGNER_DESC .data = NULL ;
351
350
}
352
351
explicit_bzero (& SIGNER_DESC , sizeof (SIGNER_DESC ));
353
352
}
0 commit comments