Skip to content

Commit 074e465

Browse files
authored
Merge pull request #75 from HathorNetwork/patch/v1.1.1
patch: v1.1.1
2 parents 1b2d438 + dd9d721 commit 074e465

File tree

4 files changed

+40
-5
lines changed

4 files changed

+40
-5
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Checklist
2+
<!-- Put an `x` in each box when you have completed the items. -->
3+
- [ ] App update process has been followed <!-- See comment below -->
4+
- [ ] Target branch is `develop` <!-- unless you have a very good reason -->
5+
- [ ] Application version has been bumped <!-- required if your changes are to be deployed -->
6+
7+
<!-- Make sure you followed the process described in https://developers.ledger.com/docs/embedded-app/maintenance/ before opening your Pull Request.
8+
Don't hesitate to contact us directly on Discord if you have any questions ! https://developers.ledger.com/discord -->
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Ensure compliance with Ledger guidelines
2+
3+
# This workflow is mandatory in all applications
4+
# It calls a reusable workflow guidelines_enforcer developed by Ledger's internal developer team.
5+
# The successful completion of the reusable workflow is a mandatory step for an app to be available on the Ledger
6+
# application store.
7+
#
8+
# More information on the guidelines can be found in the repository:
9+
# LedgerHQ/ledger-app-workflows/
10+
11+
on:
12+
workflow_dispatch:
13+
push:
14+
branches:
15+
- master
16+
- main
17+
- develop
18+
pull_request:
19+
20+
jobs:
21+
guidelines_enforcer:
22+
name: Call Ledger guidelines_enforcer
23+
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_guidelines_enforcer.yml@v1

ledger_app.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[app]
2+
build_directory = "./"
3+
sdk = "C"
4+
devices = ["nanos", "nanox", "nanos+"]

src/ui/display.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ bool check_output_index_state() {
231231
}
232232

233233
void inplace_selection_sort(size_t len, uint8_t* list) {
234-
size_t i, j, position;
234+
size_t i = 0, j = 0, position = 0;
235235
uint8_t tmp;
236236
for (i = 0; i < (len - 1); i++) {
237237
position = i;
@@ -252,7 +252,7 @@ bool skip_change_outputs() {
252252
return false;
253253
}
254254
// confirmed outputs holds the true current output index
255-
uint8_t change_indices[1 + TX_MAX_TOKENS];
255+
uint8_t change_indices[1 + TX_MAX_TOKENS] = {0};
256256
for (uint8_t i = 0; i < G_context.tx_info.change_len; i++) {
257257
change_indices[i] = G_context.tx_info.change_info[i].index;
258258
}
@@ -318,15 +318,15 @@ bool prepare_display_output() {
318318

319319
// token_index == 0 means HTR, else use token_index-1 as index on the tokens array
320320
if (token_index == 0) {
321-
strcpy(symbol, "HTR");
321+
strlcpy(symbol, "HTR", 4);
322322
symbol_len = 3;
323323
} else {
324324
// custom token
325325
token_symbol_t* token = G_context.tx_info.tokens[token_index - 1];
326-
strcpy(symbol, token->symbol);
326+
strlcpy(symbol, token->symbol, MAX_TOKEN_SYMBOL_LEN + 1);
327327
symbol_len = strlen(token->symbol);
328328
}
329-
strcpy(g_amount, symbol);
329+
strlcpy(g_amount, symbol, MAX_TOKEN_SYMBOL_LEN + 1);
330330
g_amount[symbol_len] = ' ';
331331
format_value(output.value, g_amount + symbol_len + 1);
332332
return false;

0 commit comments

Comments
 (0)