Fix Crypto.isValidAddress to return false when passed empty string

This commit is contained in:
catbref 2019-04-04 10:41:04 +01:00
parent d9be12e62f
commit ed94c3c5b3

View File

@ -100,7 +100,7 @@ public class Crypto {
}
// Check address length
if (addressBytes.length != Account.ADDRESS_LENGTH)
if (addressBytes == null || addressBytes.length != Account.ADDRESS_LENGTH)
return false;
// Check by address type