Skip to content

Commit

Permalink
Reset BSS at start in lib mode
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeutin-ledger committed Nov 17, 2023
1 parent eefb7e1 commit c1de5cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/swap/handle_swap_sign_transaction.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "handle_swap_sign_transaction.h"
#include "ux.h"
#include "os.h"
#include "os_io_seproxyhal.h"
#include "../apdu/global.h"
#include "swap_lib_calls.h"
Expand All @@ -26,6 +27,7 @@ bool copy_transaction_parameters(create_transaction_parameters_t* params) {
return false;
}

os_explicit_zero_BSS_segment();
memcpy(&approval_strings.swap, &stack_data, sizeof(stack_data));

return true;
Expand All @@ -46,7 +48,7 @@ void handle_swap_sign_transaction(void) {
#endif // TARGET_NANOX
#ifdef HAVE_BLE
BLE_power(0, NULL);
BLE_power(1, "Nano X");
BLE_power(1, NULL);
#endif // HAVE_BLE
app_main();
}

0 comments on commit c1de5cf

Please sign in to comment.