From 8985511209e4363d808125ed044e3ff8b759a332 Mon Sep 17 00:00:00 2001 From: m2049r Date: Thu, 14 Jun 2018 22:28:33 +0200 Subject: [PATCH] fix length test (#314) --- .../java/com/m2049r/xmrwallet/util/BitcoinAddressValidator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/m2049r/xmrwallet/util/BitcoinAddressValidator.java b/app/src/main/java/com/m2049r/xmrwallet/util/BitcoinAddressValidator.java index 05d2b1e0..5d1dda91 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/util/BitcoinAddressValidator.java +++ b/app/src/main/java/com/m2049r/xmrwallet/util/BitcoinAddressValidator.java @@ -66,7 +66,7 @@ public class BitcoinAddressValidator { byte[] result = new byte[25]; byte[] numBytes = num.toByteArray(); - if (numBytes.length > result.length) return null; + if (num.bitLength() > 200) return null; if (num.bitLength() == 200) { System.arraycopy(numBytes, 1, result, 0, 25);