diff --git a/src/handle_query_contract_ui.c b/src/handle_query_contract_ui.c index afeb662..c485565 100644 --- a/src/handle_query_contract_ui.c +++ b/src/handle_query_contract_ui.c @@ -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); diff --git a/tests/elfs/paraswap_nanos.elf b/tests/elfs/paraswap_nanos.elf index 66a9167..724ace1 100755 Binary files a/tests/elfs/paraswap_nanos.elf and b/tests/elfs/paraswap_nanos.elf differ diff --git a/tests/elfs/paraswap_nanox.elf b/tests/elfs/paraswap_nanox.elf index 715811c..6365254 100755 Binary files a/tests/elfs/paraswap_nanox.elf and b/tests/elfs/paraswap_nanox.elf differ