-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: not appending to buffer on multiple ops #31
Conversation
@tdejoigny-ledger please take a look |
bd393f2
to
2260710
Compare
hello @dj8yfo , do you have a discord account ? |
@@ -360,6 +360,7 @@ static void add_chunk_data(const uint8_t *input_data, size_t input_length) | |||
// PRINTF("data_size: %d\n", input_length); | |||
if (tmp_ctx.signing_context.buffer_used + input_length > MAX_DATA_SIZE) | |||
{ | |||
tmp_ctx.signing_context.buffer_used = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#32 is fast forward extension of this pr, as it depends on signing context reset on overflow in this line,
when first attempting to sign a too long message normally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hello @dj8yfo, I noticed that you were making some contributions to the Near app. It could be good if you can join the dedicated Near channel on our discord, it will be easier to discuss about your PRs and the app process. |
@tdejoigny-ledger , sure. upd: probably not relevant here, as the community appears not to be public by default |
This affects the behaviour when signing multiple tx-s WITHOUT quitting near app between operations:
Below are signatures of the very same message:
ledger prior to fix
8f38d3db42410b03a63110f58a0c84eaf39a22dbe4e9ca866b406347342e897fa181fd0f9dbfcd0b1d4bbec1369f0f30bce3fa393a034670c8ad2c2cee24af02
71a89d556194d61d49691dfdc0f3921dcdf2039c0995999b8502e43b96ea830dc00d6f53870dfc0d0d382f9a9d3908f4b8525cedc9e05408a37bff009b42fa0d
SW_BUFFER_OVERFLOW 0x6990
ledger after fix
8f38d3db42410b03a63110f58a0c84eaf39a22dbe4e9ca866b406347342e897fa181fd0f9dbfcd0b1d4bbec1369f0f30bce3fa393a034670c8ad2c2cee24af02
8f38d3db42410b03a63110f58a0c84eaf39a22dbe4e9ca866b406347342e897fa181fd0f9dbfcd0b1d4bbec1369f0f30bce3fa393a034670c8ad2c2cee24af02
8f38d3db42410b03a63110f58a0c84eaf39a22dbe4e9ca866b406347342e897fa181fd0f9dbfcd0b1d4bbec1369f0f30bce3fa393a034670c8ad2c2cee24af02