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:
@@ -1,4 +1,5 @@
|
|||||||
#include "os_io_seproxyhal.h"
|
#include "os_io_seproxyhal.h"
|
||||||
|
#include "os.h"
|
||||||
#include "ux.h"
|
#include "ux.h"
|
||||||
#include "handle_swap_sign_transaction.h"
|
#include "handle_swap_sign_transaction.h"
|
||||||
#include "shared_context.h"
|
#include "shared_context.h"
|
||||||
@@ -45,6 +46,7 @@ bool copy_transaction_parameters(create_transaction_parameters_t* sign_transacti
|
|||||||
stack_data.maxFee,
|
stack_data.maxFee,
|
||||||
sizeof(stack_data.maxFee));
|
sizeof(stack_data.maxFee));
|
||||||
|
|
||||||
|
os_explicit_zero_BSS_segment();
|
||||||
memcpy(&strings.common, &stack_data, sizeof(stack_data));
|
memcpy(&strings.common, &stack_data, sizeof(stack_data));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1067,7 +1067,7 @@ void library_main(struct libargs_s *args) {
|
|||||||
init_coin_config(&coin_config);
|
init_coin_config(&coin_config);
|
||||||
args->chain_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
|
/* This loop ensures that library_main_helper and os_lib_end are called
|
||||||
* within a try context, even if an exception is thrown */
|
* within a try context, even if an exception is thrown */
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user