Skip to content

Commit ffc1b89

Browse files
Merge pull request #514 from LedgerHQ/fix/apa/token_ticker_length_check
Fix comparison for token ticker length being off by one
2 parents 8adb2da + 6115878 commit ffc1b89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src_features/provideErc20TokenInformation/cmd_provideTokenInfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void handleProvideErc20TokenInformation(uint8_t p1,
127127
}
128128
tickerLength = workBuffer[offset++];
129129
dataLength--;
130-
if ((tickerLength + 1) >= sizeof(token->ticker)) {
130+
if ((tickerLength + 1) > sizeof(token->ticker)) {
131131
THROW(0x6A80);
132132
}
133133
if (dataLength < tickerLength + 20 + 4 + 4) {

0 commit comments

Comments
 (0)