Fix NPE when encrypted MMS has bad base64 encoding
// FREEBIE
This commit is contained in:
parent
8031c788d9
commit
dbd8a4083c
1 changed files with 4 additions and 0 deletions
|
@ -61,6 +61,10 @@ public class MmsCipher {
|
|||
byte[] decodedCiphertext = textTransport.getDecodedMessage(ciphertext.get());
|
||||
byte[] plaintext;
|
||||
|
||||
if (decodedCiphertext == null) {
|
||||
throw new InvalidMessageException("failed to decode ciphertext");
|
||||
}
|
||||
|
||||
try {
|
||||
plaintext = sessionCipher.decrypt(new WhisperMessage(decodedCiphertext));
|
||||
} catch (InvalidMessageException e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue