mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-14 10:24:32 -05:00
59bf3b75c7
https://review.lineageos.org/c/LineageOS/android_frameworks_base/+/353117 https://review.lineageos.org/q/topic:Q_asb_2023-03 https://review.lineageos.org/q/topic:Q_asb_2023-04 https://review.lineageos.org/q/topic:Q_asb_2023-05 https://review.lineageos.org/q/topic:Q_asb_2023-06 https://review.lineageos.org/q/topic:Q_asb_2023-07 https://review.lineageos.org/q/topic:Q_asb_2023-08 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376560 https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376561 https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376562 https://review.lineageos.org/q/topic:Q_asb_2023-09 https://review.lineageos.org/q/topic:Q_asb_2023-10 https://review.lineageos.org/q/topic:Q_asb_2023-11 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376563 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_webp/+/376568 https://review.lineageos.org/q/topic:Q_asb_2023-12 https://review.lineageos.org/q/topic:Q_asb_2024-01 https://review.lineageos.org/q/topic:Q_asb_2024-02 https://review.lineageos.org/q/topic:Q_asb_2024-03 Signed-off-by: Tavi <tavi@divested.dev>
43 lines
1.9 KiB
Diff
43 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: "Nate(Qiang) Jiang" <qiangjiang@google.com>
|
|
Date: Wed, 12 Apr 2023 18:32:50 +0000
|
|
Subject: [PATCH] DO NOT MERGE: Limit the ServiceFriendlyNames
|
|
|
|
Bug: 274445194
|
|
Test: atest android.net.wifi
|
|
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6b1746ab6f0ff4020c78381833554f20344c2e2a)
|
|
Merged-In: Id4e16007531ba1ce3e3f9fa3d3111b5af57751be
|
|
Change-Id: Id4e16007531ba1ce3e3f9fa3d3111b5af57751be
|
|
---
|
|
.../wifi/hotspot2/PasspointConfiguration.java | 17 +++++++++++++++++
|
|
1 file changed, 17 insertions(+)
|
|
|
|
diff --git a/wifi/java/android/net/wifi/hotspot2/PasspointConfiguration.java b/wifi/java/android/net/wifi/hotspot2/PasspointConfiguration.java
|
|
index 9095b5d927a2..dd23e504c467 100644
|
|
--- a/wifi/java/android/net/wifi/hotspot2/PasspointConfiguration.java
|
|
+++ b/wifi/java/android/net/wifi/hotspot2/PasspointConfiguration.java
|
|
@@ -597,6 +597,23 @@ public final class PasspointConfiguration implements Parcelable {
|
|
}
|
|
}
|
|
}
|
|
+ if (mServiceFriendlyNames != null) {
|
|
+ if (mServiceFriendlyNames.size() > MAX_NUMBER_OF_ENTRIES) {
|
|
+ Log.e(TAG, "ServiceFriendlyNames exceed the max!");
|
|
+ return false;
|
|
+ }
|
|
+ for (Map.Entry<String, String> names : mServiceFriendlyNames.entrySet()) {
|
|
+ if (names.getKey() == null || names.getValue() == null) {
|
|
+ Log.e(TAG, "Service friendly name entry should not be null");
|
|
+ return false;
|
|
+ }
|
|
+ if (names.getKey().length() > MAX_STRING_LENGTH
|
|
+ || names.getValue().length() > MAX_STRING_LENGTH) {
|
|
+ Log.e(TAG, "Service friendly name is to long");
|
|
+ return false;
|
|
+ }
|
|
+ }
|
|
+ }
|
|
return true;
|
|
}
|
|
|