Merge to master#114
Merged
Merged
Conversation
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.
Contributor
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.