mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
fix(crypto): set output length correctly in xmr_base58_encode()
This commit is contained in:
parent
81c9cd66ef
commit
7a5cfbae19
@ -138,8 +138,12 @@ bool decode_block(const char* block, size_t size, char* res)
|
||||
|
||||
bool xmr_base58_encode(char *b58, size_t *b58sz, const void *data, size_t binsz)
|
||||
{
|
||||
if (binsz==0)
|
||||
if (binsz==0) {
|
||||
if (b58sz) {
|
||||
*b58sz = 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
const char * data_bin = data;
|
||||
size_t full_block_count = binsz / full_block_size;
|
||||
|
Loading…
Reference in New Issue
Block a user