Fix comparison for token ticker length being off by one

This commit is contained in:
Alexandre Paillier
2023-12-18 17:26:53 +01:00
parent 8adb2da008
commit 611587832f

View File

@@ -127,7 +127,7 @@ void handleProvideErc20TokenInformation(uint8_t p1,
}
tickerLength = workBuffer[offset++];
dataLength--;
if ((tickerLength + 1) >= sizeof(token->ticker)) {
if ((tickerLength + 1) > sizeof(token->ticker)) {
THROW(0x6A80);
}
if (dataLength < tickerLength + 20 + 4 + 4) {