summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-06-16 18:46:39 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-06-16 18:46:39 +0000
commit3d24100ccb7f70c1b6d3e601353b2b0e07893f9e (patch)
tree63992f9a59323302dd918bb733e27a305fb43e9d
parentdceb463d1e7dbbf0dedfcc7fa2a5ee77ddff3b35 (diff)
parentc9aa0df34bf46d3293f5030f2d997002eb4439d2 (diff)
downloadwifi-nougat-mr1.1-release.tar.gz
Merge cherrypicks of [2420241, 2420242, 2420222, 2420190, 2420097, 2420079, 2420098, 2420099, 2420100, 2420153, 2420120, 2420208, 2420281, 2420209, 2420282, 2420301, 2420192, 2420302, 2420193, 2420211, 2420264, 2420247, 2420157, 2420265, 2420216, 2420307, 2420217, 2420250, 2420341, 2420219, 2420326, 2420180, 2420254] into nyc-mr1-security-a-releaseandroid-7.1.1_r54android-7.1.1_r51android-7.1.1_r47nougat-mr1.1-release
Change-Id: Ia0abf9cb8b52f378f85f77261c89c2bd61011d30
-rw-r--r--service/jni/com_android_server_wifi_WifiNative.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/service/jni/com_android_server_wifi_WifiNative.cpp b/service/jni/com_android_server_wifi_WifiNative.cpp
index ad7d464ae..ffd5b559f 100644
--- a/service/jni/com_android_server_wifi_WifiNative.cpp
+++ b/service/jni/com_android_server_wifi_WifiNative.cpp
@@ -49,6 +49,7 @@ extern "C"
jint Java_com_android_server_wifi_WifiNative_registerNanNatives(JNIEnv* env, jclass clazz);
static jint DBG = false;
+constexpr int SAFE_NET_LOG_ID = 0x534e4554;
//Please put all HAL function call here and call from the function table instead of directly call
wifi_hal_fn hal_fn;
@@ -790,7 +791,7 @@ static jboolean android_net_wifi_setHotlist(
if (params.num_bssid >
static_cast<int>(sizeof(params.ap) / sizeof(params.ap[0]))) {
ALOGE("setHotlist array length is too long");
- android_errorWriteLog(0x534e4554, "31856351");
+ android_errorWriteLog(SAFE_NET_LOG_ID, "31856351");
return false;
}
@@ -909,7 +910,12 @@ static jboolean android_net_wifi_trackSignificantWifiChange(
ALOGE("BssidInfo array length was 0");
return false;
}
-
+ if (params.num_bssid >
+ static_cast<int>(sizeof(params.ap) / sizeof(params.ap[0]))) {
+ ALOGE("trackSignificantWifiChange array length is too long");
+ android_errorWriteLog(SAFE_NET_LOG_ID, "37775935");
+ return false;
+ }
ALOGD("Initialized common fields %d, %d, %d, %d", params.rssi_sample_size,
params.lost_ap_sample_size, params.min_breaching, params.num_bssid);