am aaf4c41e: DO NOT MERGE Fix externally reported security vulnerability.
* commit 'aaf4c41e2e353be01fe9cd5f8ca97bf37565dc41':
DO NOT MERGE Fix externally reported security vulnerability.
diff --git a/sip/src/com/android/services/telephony/sip/SipBroadcastReceiver.java b/sip/src/com/android/services/telephony/sip/SipBroadcastReceiver.java
index 0b701ce..545854d 100644
--- a/sip/src/com/android/services/telephony/sip/SipBroadcastReceiver.java
+++ b/sip/src/com/android/services/telephony/sip/SipBroadcastReceiver.java
@@ -58,7 +58,13 @@
private void takeCall(Context context, Intent intent) {
if (VERBOSE) log("takeCall, intent: " + intent);
- PhoneAccountHandle accountHandle = intent.getParcelableExtra(SipUtil.EXTRA_PHONE_ACCOUNT);
+ PhoneAccountHandle accountHandle = null;
+ try {
+ accountHandle = intent.getParcelableExtra(SipUtil.EXTRA_PHONE_ACCOUNT);
+ } catch (ClassCastException e) {
+ log("takeCall, Bad account handle detected. Bailing!");
+ return;
+ }
if (accountHandle != null) {
Bundle extras = new Bundle();
extras.putParcelable(SipUtil.EXTRA_INCOMING_CALL_INTENT, intent);