Skip to content

Commit 3b7e7ad

Browse files
ldg-github-ciapaillier-ledger
authored andcommitted
[update] Branch develop | Commit 70cc0a87ffc0ebe77450e52d23231a44962e5945
[update] Branch develop | Commit 97f17b28cf7dcd74933126f8105e246713bf3d58
1 parent 4d8e044 commit 3b7e7ad

File tree

5 files changed

+51
-25
lines changed

5 files changed

+51
-25
lines changed

CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,27 @@
55
| :rotating_light: | Breaks build |
66
| :warning: | Breaks compatibility with app |
77

8-
## [latest](/) - 2023/10/19
8+
## [latest](/) - 2023/12/07
9+
10+
### Fixed
11+
12+
* standard\_plugin build ([this PR on the SDK](https://github.com/LedgerHQ/ledger-secure-sdk/pull/473) had broken it)
13+
* Broken variant auto-setting in the standard\_plugin Makefile
14+
* Missing null-check on parameters received by the plugins
15+
16+
### Changed
17+
18+
* utils renamed to plugin\_utils to prevent filename conflicts in plugins
19+
20+
## [4d8e044](/../../commit/4d8e044) - 2023/11/09
21+
22+
### Added
23+
24+
* standard\_plugin Makefile so plugins can use it & have a really small Makefile
25+
with only the relevant information
26+
* Comments in the plugin interface header file
27+
28+
## [1fe4085](/../../commit/1fe4085) - 2023/10/19
929

1030
### Changed
1131

include/main.c

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -53,28 +53,32 @@ static void call_app_ethereum() {
5353

5454
// Function to dispatch calls from the ethereum app.
5555
static void dispatch_call(int message, void *parameters) {
56-
switch (message) {
57-
case ETH_PLUGIN_INIT_CONTRACT:
58-
handle_init_contract(parameters);
59-
break;
60-
case ETH_PLUGIN_PROVIDE_PARAMETER:
61-
handle_provide_parameter(parameters);
62-
break;
63-
case ETH_PLUGIN_FINALIZE:
64-
handle_finalize(parameters);
65-
break;
66-
case ETH_PLUGIN_PROVIDE_INFO:
67-
handle_provide_token(parameters);
68-
break;
69-
case ETH_PLUGIN_QUERY_CONTRACT_ID:
70-
handle_query_contract_id(parameters);
71-
break;
72-
case ETH_PLUGIN_QUERY_CONTRACT_UI:
73-
handle_query_contract_ui(parameters);
74-
break;
75-
default:
76-
PRINTF("Unhandled message %d\n", message);
77-
break;
56+
if (parameters != NULL) {
57+
switch (message) {
58+
case ETH_PLUGIN_INIT_CONTRACT:
59+
handle_init_contract(parameters);
60+
break;
61+
case ETH_PLUGIN_PROVIDE_PARAMETER:
62+
handle_provide_parameter(parameters);
63+
break;
64+
case ETH_PLUGIN_FINALIZE:
65+
handle_finalize(parameters);
66+
break;
67+
case ETH_PLUGIN_PROVIDE_INFO:
68+
handle_provide_token(parameters);
69+
break;
70+
case ETH_PLUGIN_QUERY_CONTRACT_ID:
71+
handle_query_contract_id(parameters);
72+
break;
73+
case ETH_PLUGIN_QUERY_CONTRACT_UI:
74+
handle_query_contract_ui(parameters);
75+
break;
76+
default:
77+
PRINTF("Unhandled message %d\n", message);
78+
break;
79+
}
80+
} else {
81+
PRINTF("Received null parameters\n");
7882
}
7983
}
8084

include/utils.c renamed to include/plugin_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*****************************************************************************/
1717

18-
#include "utils.h"
18+
#include "plugin_utils.h"
1919

2020
bool find_selector(uint32_t selector, const uint32_t *array, size_t size, size_t *idx) {
2121
for (size_t i = 0; i < size; ++i) {
File renamed without changes.

standard_plugin.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ CURVE_APP_LOAD_PARAMS = secp256k1
4848
PATH_APP_LOAD_PARAMS ?= "44'/60'"
4949

5050
VARIANT_PARAM = COIN
51-
VARIANTS_VALUES ?= $(NORMAL_NAME)
51+
VARIANT_VALUES ?= $(NORMAL_NAME)
5252

5353
HAVE_APPLICATION_FLAG_LIBRARY = 1
5454

@@ -57,6 +57,8 @@ DISABLE_STANDARD_SNPRINTF = 1
5757
DISABLE_STANDARD_USB = 1
5858
DISABLE_STANDARD_WEBUSB = 1
5959
DISABLE_STANDARD_BAGL_UX_FLOW = 1
60+
DISABLE_DEBUG_LEDGER_ASSERT = 1
61+
DISABLE_DEBUG_THROW = 1
6062

6163
# Required for PRINTFs to compile
6264
ifeq ($(DEBUG),0)

0 commit comments

Comments
 (0)