Merge pull request #423 from LedgerHQ/fbe/reset_BSS_for_swap

Reset BSS section at the start of the app in swap mode for signature
This commit is contained in:
François Beutin
2023-05-02 13:30:44 +02:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
#include "os_io_seproxyhal.h"
#include "os.h"
#include "ux.h"
#include "handle_swap_sign_transaction.h"
#include "shared_context.h"
@@ -45,6 +46,7 @@ bool copy_transaction_parameters(create_transaction_parameters_t* sign_transacti
stack_data.maxFee,
sizeof(stack_data.maxFee));
os_explicit_zero_BSS_segment();
memcpy(&strings.common, &stack_data, sizeof(stack_data));
return true;
}

View File

@@ -1067,7 +1067,7 @@ void library_main(struct libargs_s *args) {
init_coin_config(&coin_config);
args->chain_config = &coin_config;
}
bool end = false;
volatile bool end = false;
/* This loop ensures that library_main_helper and os_lib_end are called
* within a try context, even if an exception is thrown */
while (1) {