aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2017-01-04 21:42:16 +0100
committersteckbrief <steckbrief@chefmail.de>2017-01-04 21:42:16 +0100
commit955797a09048ee7497ca734c20626d3af5378404 (patch)
treed777ca167ab875cd2301d08bfa340415f35849ad
parent95cb2394154a287afcd295590d741096985ff69a (diff)
Fixed NPE in FileParams.setKeyAndIv
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/entities/FileParams.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/entities/FileParams.java b/src/main/java/de/thedevstack/conversationsplus/entities/FileParams.java
index 290b87b8..3abb37e4 100644
--- a/src/main/java/de/thedevstack/conversationsplus/entities/FileParams.java
+++ b/src/main/java/de/thedevstack/conversationsplus/entities/FileParams.java
@@ -93,6 +93,7 @@ public class FileParams {
}
public void setKeyAndIv(byte[] keyIvCombo) {
+ if (null != keyIvCombo) {
if (keyIvCombo.length == 48) {
this.aeskey = new byte[32];
this.iv = new byte[16];
@@ -106,6 +107,7 @@ public class FileParams {
System.arraycopy(keyIvCombo, 0, this.aeskey, 0, 16);
}
}
+ }
public void setKey(byte[] key) {
this.aeskey = key;