mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
fix(crypto): fix required output length in xmr_base58_encode()
This commit is contained in:
parent
7a5cfbae19
commit
e0358c7f24
@ -151,7 +151,7 @@ bool xmr_base58_encode(char *b58, size_t *b58sz, const void *data, size_t binsz)
|
||||
size_t res_size = full_block_count * full_encoded_block_size + encoded_block_sizes[last_block_size];
|
||||
|
||||
if (b58sz){
|
||||
if (res_size >= *b58sz){
|
||||
if (res_size > *b58sz){
|
||||
return false;
|
||||
}
|
||||
*b58sz = res_size;
|
||||
|
Loading…
Reference in New Issue
Block a user