summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Pasanen <dan.pasanen@gmail.com>2017-08-07 21:13:44 (GMT)
committerDan Pasanen <dan.pasanen@gmail.com>2017-08-07 21:13:44 (GMT)
commit1f8fc743cf0c30a648d0242867cee1e8359524a1 (patch)
treedf46523765ac9ed13bf9d5f41342cb6adc552c31
parent05213b97c34f35c0084d474d8f9d7aafd13317b3 (diff)
parentba55915edd8474513e0ab5dd1e1f40d5c8554387 (diff)
downloadandroid_frameworks_opt_net_wifi-cm-14.1.zip
android_frameworks_opt_net_wifi-cm-14.1.tar.gz
android_frameworks_opt_net_wifi-cm-14.1.tar.bz2
Merge tag 'android-7.1.2_r29' into cm-14.1cm-14.1
Android 7.1.2 Release 29 (NJH47F) # gpg: Signature made Fri 28 Jul 2017 01:56:02 PM CDT # gpg: using DSA key E8AD3F819AB10E78 # gpg: Can't check signature: No public key
-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 7e70d95..2dd4c03 100644
--- a/service/jni/com_android_server_wifi_WifiNative.cpp
+++ b/service/jni/com_android_server_wifi_WifiNative.cpp
@@ -55,6 +55,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;
@@ -857,7 +858,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;
}
@@ -976,7 +977,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);