diff options
| author | 2015-10-14 17:42:14 +0000 | |
|---|---|---|
| committer | 2015-10-14 17:42:14 +0000 | |
| commit | f23eece2006f04785fa1b873afc66f01bb238e0b (patch) | |
| tree | d65cf93c5111608510eded936c3e8fbbe5a80cc1 | |
| parent | c095272a807880bca2848b102438ec9a13dec749 (diff) | |
| parent | b7e722b88fab8b67f8a2ef54a7acb8c6672b6f46 (diff) | |
am b7e722b8: Merge "Don\'t crash if an invalid always-on VPN profile is configured." into mnc-dr-dev
* commit 'b7e722b88fab8b67f8a2ef54a7acb8c6672b6f46':
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 77837b7dce4e..4c0314301f74 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -3212,6 +3212,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), |