mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
Fix for NPE on null encrypted MMS messages.
This commit is contained in:
parent
c3e21f3f75
commit
f2475491fe
@ -61,7 +61,7 @@ public class MessageMac {
|
||||
}
|
||||
|
||||
public static byte[] getMessageWithoutMac(byte[] message) throws InvalidMacException {
|
||||
if (message.length <= MAC_LENGTH)
|
||||
if (message == null || message.length <= MAC_LENGTH)
|
||||
throw new InvalidMacException("Message shorter than MAC!");
|
||||
|
||||
byte[] strippedMessage = new byte[message.length - MAC_LENGTH];
|
||||
|
Loading…
Reference in New Issue
Block a user