diff --git a/core/java/src/net/i2p/client/naming/BlockfileNamingService.java b/core/java/src/net/i2p/client/naming/BlockfileNamingService.java index 9194d81aa160df4e245ccd250ac06f603e320fbb..d7860a727e657738fda94f09ddd411ed1245aaa3 100644 --- a/core/java/src/net/i2p/client/naming/BlockfileNamingService.java +++ b/core/java/src/net/i2p/client/naming/BlockfileNamingService.java @@ -240,7 +240,7 @@ public class BlockfileNamingService extends DummyNamingService { if (line.length() < split + 1) continue; } - String b64 = line.substring(split+1); //.trim() ?????????????? + String b64 = line.substring(split+1).trim(); Destination d = lookupBase64(b64); if (d != null) { addEntry(rv, hostsfile, key, d, sourceMsg); diff --git a/core/java/src/net/i2p/data/DataStructureImpl.java b/core/java/src/net/i2p/data/DataStructureImpl.java index 26e655af7809eaf3da31c6ac0a14ca9727e7e287..cc70f56a0dc98ccd50694b9f3bcb9dd19a1f5cd0 100644 --- a/core/java/src/net/i2p/data/DataStructureImpl.java +++ b/core/java/src/net/i2p/data/DataStructureImpl.java @@ -37,6 +37,7 @@ public abstract class DataStructureImpl implements DataStructure, Serializable { public void fromBase64(String data) throws DataFormatException { if (data == null) throw new DataFormatException("Null data passed in"); byte bytes[] = Base64.decode(data); + if (bytes == null) throw new DataFormatException("Bad Base64 \"" + data + '"'); fromByteArray(bytes); }