1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

legacy: initialize decoded variable

This commit is contained in:
Pavol Rusnak 2019-04-30 23:31:07 +02:00
parent 0a8995bc86
commit 14b2cc336a
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -1352,6 +1352,7 @@ size_t stellar_publicAddressAsStr(const uint8_t *bytes, char *out,
bool stellar_validateAddress(const char *str_address) {
bool valid = false;
uint8_t decoded[STELLAR_ADDRESS_SIZE_RAW];
memzero(decoded, sizeof(decoded));
if (strlen(str_address) != STELLAR_ADDRESS_SIZE) {
return false;
@ -1384,6 +1385,7 @@ bool stellar_validateAddress(const char *str_address) {
*/
bool stellar_getAddressBytes(const char *str_address, uint8_t *out_bytes) {
uint8_t decoded[STELLAR_ADDRESS_SIZE_RAW];
memzero(decoded, sizeof(decoded));
// Ensure address is valid
if (!stellar_validateAddress(str_address)) return false;