diff options
| author | 2015-10-14 18:01:48 +0000 | |
|---|---|---|
| committer | 2015-10-14 18:01:48 +0000 | |
| commit | 12ff46df1af8bd252c3973351cd52be178b415c4 (patch) | |
| tree | 99118e43f0eeef3bc1a5e65be2530ea702a233f6 | |
| parent | e95ce0fdb7f94b7e795efd9fd269c47caed8d570 (diff) | |
| parent | 51eb6e149581f04802784f972dfc3794a64a1788 (diff) | |
am 51eb6e14: am 9c8abd1d: am f23eece2: am b7e722b8: Merge "Don\'t crash if an invalid always-on VPN profile is configured." into mnc-dr-dev
* commit '51eb6e149581f04802784f972dfc3794a64a1788':
Don't crash if an invalid always-on VPN profile is configured.
| -rw-r--r-- | services/core/java/com/android/server/ConnectivityService.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index f914b2063e23..d03116521102 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -3215,6 +3215,11 @@ public class ConnectivityService extends IConnectivityManager.Stub final String profileName = new String(mKeyStore.get(Credentials.LOCKDOWN_VPN)); final VpnProfile profile = VpnProfile.decode( profileName, mKeyStore.get(Credentials.VPN + profileName)); + if (profile == null) { + Slog.e(TAG, "Lockdown VPN configured invalid profile " + profileName); + setLockdownTracker(null); + return true; + } int user = UserHandle.getUserId(Binder.getCallingUid()); synchronized(mVpns) { setLockdownTracker(new LockdownVpnTracker(mContext, mNetd, this, mVpns.get(user), |