forked from I2P_Developers/i2p.i2p
Base64: Catch NPE on bad input to main() decode
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user