Catch malformed NOTIFY-IND

Fixes #2508

// FREEBIE
This commit is contained in:
Moxie Marlinspike 2015-03-31 09:12:22 -07:00
parent 6181dc4037
commit e70298e624

View File

@ -41,7 +41,13 @@ public class MmsReceiveJob extends ContextJob {
}
PduParser parser = new PduParser(data);
GenericPdu pdu = parser.parse();
GenericPdu pdu = null;
try {
pdu = parser.parse();
} catch (RuntimeException e) {
Log.w(TAG, e);
}
if (pdu != null && pdu.getMessageType() == PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND) {
MmsDatabase database = DatabaseFactory.getMmsDatabase(context);