Skip to content

Commit

Permalink
[update] Branch develop | Commit c6a909ab389e18c5573b0cbc9cb6eaf931fd…
Browse files Browse the repository at this point in the history
…db02

[update] Branch develop | Commit 9e247284772bf3f8f87c3ea18c843ce15168543a
  • Loading branch information
ldg-github-ci authored and apaillier-ledger committed Apr 12, 2024
1 parent 8fe6572 commit 2bf928b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
| :rotating_light: | Breaks build |
| :warning: | Breaks compatibility with app |

## [latest](/) - 2024/03/27
## [latest](/) - 2024/04/12

### Fixed

* Fix potential oob writes in `amountToString`

## [8fe6572](/../../commit/8fe6572) - 2024/03/27

### Changed

Expand Down
5 changes: 4 additions & 1 deletion src/common_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,11 @@ bool amountToString(const uint8_t *amount,
uint8_t amount_len = strnlen(tmp_buffer, sizeof(tmp_buffer));
uint8_t ticker_len = strnlen(ticker, MAX_TICKER_LEN);

memcpy(out_buffer, ticker, MIN(out_buffer_size, ticker_len));
if (ticker_len > 0) {
if (out_buffer_size <= ticker_len + 1) {
return false;
}
memcpy(out_buffer, ticker, ticker_len);
out_buffer[ticker_len++] = ' ';
}

Expand Down

0 comments on commit 2bf928b

Please sign in to comment.