Fix for NPE on null encrypted MMS messages.

fork-5.53.8
Moxie Marlinspike 2013-04-23 14:49:32 -07:00
rodzic c3e21f3f75
commit f2475491fe
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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];