Skip to content

Merge to master#114

Merged
cedelavergne-ledger merged 9 commits into
masterfrom
develop
Jun 5, 2026
Merged

Merge to master#114
cedelavergne-ledger merged 9 commits into
masterfrom
develop

Conversation

@cedelavergne-ledger

Copy link
Copy Markdown
Contributor

No description provided.

cedelavergne-ledger and others added 9 commits June 5, 2026 16:18
Selecting a password other than the first one in the list could compute a
wrong absolute index on Nano and crash when showing or typing it.

On Nano the NBGL choices-list callback now forwards the absolute choice
index (one choice per page), whereas on wallet devices the index is
relative to the current page. The page-based offset
(page * nbPasswordsPerPage) must therefore only be applied on wallet
devices and the index used as-is on Nano.
AZERTY third-level characters (# @ [ \ ] ^ ` { | } ~) are reached with
AltGr (Right Alt) on AZERTY hosts, not Left Alt. The original code used
0x40 (Right Alt) but commit d0587ec replaced it with ALT_KEY (0x04, Left
Alt) while introducing named constants, and the accompanying unit test
locked in the wrong expected value, hiding the regression.

Restore AltGr for AZERTY via a get_alt_modifier() helper (QWERTY keeps
Left Alt) and fix/extend the unit test to assert RIGHT_ALT_KEY for all
affected characters.
When analyzed with size == 0, the loop counter `size - 1` underflows
(unsigned) to UINT32_MAX, leading to an out-of-bounds access reported by
scan-build (security.ArrayBound). At runtime size is always
PASSWORD_MAX_SIZE, but add an explicit guard for an empty array, which
has nothing to shuffle anyway.
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Code coverage report

Code Coverage

Per-file coverage
Package Line Rate Branch Rate Health
src 41% 37%
Summary 41% (69 / 168) 37% (26 / 71)

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 73.96%. Comparing base (9063d51) to head (ce5a4fb).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/hid_mapping.c 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #114      +/-   ##
==========================================
+ Coverage   69.97%   73.96%   +3.99%     
==========================================
  Files           7        7              
  Lines         343      361      +18     
  Branches       39       41       +2     
==========================================
+ Hits          240      267      +27     
+ Misses        103       88      -15     
- Partials        0        6       +6     
Flag Coverage Δ
unittests 73.96% <95.23%> (+3.99%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cedelavergne-ledger
cedelavergne-ledger merged commit 6e8ebc6 into master Jun 5, 2026
134 of 144 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants