Skip to content

Commit

Permalink
Merge pull request #266 from keepkey/pub-710
Browse files Browse the repository at this point in the history
710 merge
  • Loading branch information
markrypto authored Apr 14, 2021
2 parents 3ddcc5d + e49d455 commit 930d6ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/firmware/ethereum.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ uint8_t ethereum_extractThorchainData(const EthereumSignTx *msg,
// offset = deposit function hash + address + address + uint256
uint16_t offset = 4 + (5 * 32);
int16_t len = msg->data_length - offset;
if (msg->has_data_length && len > 0) {
if (msg->has_data_length && len > 0 && len < 256) {
memcpy(buffer, msg->data_initial_chunk.bytes + offset, len);
// String length must be < 255 characters
return len < 256 ? (uint8_t)len : 0;
return (uint8_t)len;
}
return 0;
}
Expand Down
1 change: 0 additions & 1 deletion lib/firmware/ethereum_contracts/zxliquidtx.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ bool zx_confirmZxLiquidTx(uint32_t data_total, const EthereumSignTx *msg) {
confirm(ButtonRequestType_ButtonRequest_ConfirmOutput, arStr,
"Minimum %s", constr1);

snprintf(constr1, 32, "%lld", deadline);
confirm(ButtonRequestType_ButtonRequest_ConfirmOutput, arStr,
"Deadline %s", ctime((const time_t *)&deadline));

Expand Down

0 comments on commit 930d6ad

Please sign in to comment.