Skip to content

Commit

Permalink
Merge pull request #4 from blooo-io/fix-changes-max-length-strnlen
Browse files Browse the repository at this point in the history
fix: Change max length strnlen in parsing data
  • Loading branch information
n4l5u0r authored Nov 1, 2021
2 parents 10b976a + 56ed37f commit ba64fd4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handle_query_contract_ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ static void prepend_ticker(char *dest, size_t destsize, const char *ticker) {
THROW(0x6503);
}
size_t ticker_len = strnlen(ticker, MAX_TICKER_LEN);
size_t dest_len = strnlen(dest, destsize - ticker_len);
size_t dest_len = strnlen(dest, destsize);

if (dest_len + ticker_len >= destsize) {
THROW(0x6503);
Expand Down
Binary file modified tests/elfs/paraswap_nanos.elf
Binary file not shown.
Binary file modified tests/elfs/paraswap_nanox.elf
Binary file not shown.

0 comments on commit ba64fd4

Please sign in to comment.