mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 04:18:10 +00:00
fix(crypto): clarify incorrect base58.c code comment
This commit is contained in:
parent
38c526719c
commit
91dd21b561
@ -119,7 +119,11 @@ bool decode_block(const char* block, size_t size, char* res)
|
||||
return false; // Overflow
|
||||
|
||||
res_num = tmp;
|
||||
order *= alphabet_size; // Never overflows, 58^10 < 2^64
|
||||
// The original code comment for the order multiplication says
|
||||
// "Never overflows, 58^10 < 2^64"
|
||||
// This is incorrect since it overflows on the 11th iteration
|
||||
// However, there is no negative impact since the result is unused
|
||||
order *= alphabet_size;
|
||||
}
|
||||
|
||||
if ((size_t)res_size < full_block_size && (UINT64_C(1) << (8 * res_size)) <= res_num)
|
||||
|
Loading…
Reference in New Issue
Block a user