summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-06-20 22:45:41 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-06-20 22:45:41 +0000
commit5ae85de61e5c3ffab19f8cfa411925adf903e624 (patch)
tree63992f9a59323302dd918bb733e27a305fb43e9d
parent41c42f5bb544acf8bede2d05c6325657d92bd83c (diff)
parent004b6dd21949b8e240cb7f8c041e483e8949453b (diff)
downloadwifi-nougat-mr1.5-release.tar.gz
Merge cherrypicks of [2435782, 2435615, 2435577, 2435653, 2435616, 2435708, 2435617, 2435558, 2435784, 2435709, 2435631, 2435559, 2435560, 2435618, 2435801, 2435674, 2435710, 2435746, 2435579, 2435747, 2435711, 2435785, 2435786, 2435787, 2435713, 2435804, 2435822, 2435842, 2435753, 2435965, 2436024, 2435885] into nyc-mr1-security-e-releaseandroid-7.1.1_r57android-7.1.1_r55android-7.1.1_r52android-7.1.1_r48nougat-mr1.7-releasenougat-mr1.5-release
Change-Id: I720a47361a8ad067033bd48fb82153c6a8c7ad82
-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);