Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5b2348d authored by Shruthi Krishna's avatar Shruthi Krishna
Browse files

Merge commit 'android-4.4.2_r1' into merge_branch

* commit 'android-4.4.2_r1':
  Fix OOBE crash/DoS after receiving 0-byte WAP push.

Conflicts:
	src/java/com/android/internal/telephony/WapPushOverSms.java

Change-Id: I1c01862f0729b730b930430f539ca683180ad12c
parents 726b437c 567ea111
Loading
Loading
Loading
Loading
+151 −144
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ public class WapPushOverSms implements ServiceConnection {

        if (DBG) Rlog.d(TAG, "Rx: " + IccUtils.bytesToHexString(pdu));

        try {
            int index = 0;
            int transactionId = pdu[index++] & 0xFF;
            int pduType = pdu[index++] & 0xFF;
@@ -257,5 +258,11 @@ public class WapPushOverSms implements ServiceConnection {

            handler.dispatchIntent(intent, permission, appOp, receiver);
            return Activity.RESULT_OK;
        } catch (ArrayIndexOutOfBoundsException aie) {
            // 0-byte WAP PDU or other unexpected WAP PDU contents can easily throw this;
            // log exception string without stack trace and return false.
            Rlog.e(TAG, "ignoring dispatchWapPdu() array index exception: " + aie);
            return Intents.RESULT_SMS_GENERIC_ERROR;
        }
    }
}