diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-15 19:04:27 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-15 19:04:27 +0000 |
commit | ba55915edd8474513e0ab5dd1e1f40d5c8554387 (patch) | |
tree | 7d563a3603711711582beaf623f06c4d07e1a627 | |
parent | 89c893388a2fe8f9b84dca3dd2ec6c5a793fbea1 (diff) | |
parent | e3f551d31eedc7fa6af90412b6596ca0052f90d2 (diff) | |
download | android_frameworks_opt_net_wifi-ba55915edd8474513e0ab5dd1e1f40d5c8554387.tar.gz android_frameworks_opt_net_wifi-ba55915edd8474513e0ab5dd1e1f40d5c8554387.tar.bz2 android_frameworks_opt_net_wifi-ba55915edd8474513e0ab5dd1e1f40d5c8554387.zip |
Merge cherrypicks of [2413849, 2413760, 2413901, 2413776, 2413658, 2413792, 2413850, 2413851, 2413793, 2413866, 2413738, 2413659, 2413660, 2413867, 2413868, 2413885, 2413829, 2413814, 2413886, 2413921, 2413777, 2413887, 2413854, 2413889, 2413890, 2413855, 2413869, 2413740, 2413816, 2413831, 2413832, 2413817, 2413892, 2413797, 2413779] into nyc-mr2-pixel-monthly-release
Change-Id: Id912fb06f81566c8f893e35d71a979c7c24a9293
-rw-r--r-- | service/jni/com_android_server_wifi_WifiNative.cpp | 10 |
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); |