diff --git a/core/java/src/net/i2p/data/Base64.java b/core/java/src/net/i2p/data/Base64.java index 578dadda25..2a30d3631a 100644 --- a/core/java/src/net/i2p/data/Base64.java +++ b/core/java/src/net/i2p/data/Base64.java @@ -264,6 +264,8 @@ public class Base64 { private static void decode(InputStream in, OutputStream out) throws IOException { byte decoded[] = decode(new String(read(in))); + if (decoded == null) + throw new IOException("Invalid base 64 string"); out.write(decoded); }