I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit fff7fbe1 authored by zzz's avatar zzz
Browse files

Base64: Catch NPE on bad input to main() decode

parent a50afeb5
No related branches found
No related tags found
No related merge requests found
...@@ -264,6 +264,8 @@ public class Base64 { ...@@ -264,6 +264,8 @@ public class Base64 {
private static void decode(InputStream in, OutputStream out) throws IOException { private static void decode(InputStream in, OutputStream out) throws IOException {
byte decoded[] = decode(new String(read(in))); byte decoded[] = decode(new String(read(in)));
if (decoded == null)
throw new IOException("Invalid base 64 string");
out.write(decoded); out.write(decoded);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment