summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid Merger <noreply-android-build-merger@google.com>2019-05-13 21:01:51 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-05-13 21:01:51 +0000
commit55ffcf61b637c158cf16b2b35fa46da69595c382 (patch)
treeb3f063a2db0b7e41af07b705f8dac4830d2fb11e
parent43b4a37fc28ddbbfd44df96ae9af85096639d17a (diff)
parent500ed30d27b12d0c633157ec8c81cd2c26c46f0a (diff)
downloadplatform_hardware_broadcom_wlan-55ffcf61b637c158cf16b2b35fa46da69595c382.tar.gz
platform_hardware_broadcom_wlan-55ffcf61b637c158cf16b2b35fa46da69595c382.tar.bz2
platform_hardware_broadcom_wlan-55ffcf61b637c158cf16b2b35fa46da69595c382.zip
Merge "Snap for 5450365 from f632b64f225162de0c7e8dee5953d44bbfcf353f to pi-platform-release am: df369a168d" into pie-gsipie-gsi
-rw-r--r--bcmdhd/wifi_hal/gscan.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/bcmdhd/wifi_hal/gscan.cpp b/bcmdhd/wifi_hal/gscan.cpp
index 1ccaf30..4e4ee93 100644
--- a/bcmdhd/wifi_hal/gscan.cpp
+++ b/bcmdhd/wifi_hal/gscan.cpp
@@ -1197,6 +1197,7 @@ public:
}
}
int createSetupRequest(WifiRequest& request) {
+ char tmp_buf[DOT11_MAX_SSID_LEN + 1];
if (epno_params.num_networks > MAX_EPNO_NETWORKS) {
ALOGE("wrong epno num_networks:%d", epno_params.num_networks);
return WIFI_ERROR_INVALID_ARGS;
@@ -1258,14 +1259,17 @@ public:
if (attr2 == NULL) {
return WIFI_ERROR_OUT_OF_MEMORY;
}
- result = request.put(GSCAN_ATTRIBUTE_EPNO_SSID, ssid_list[i].ssid, DOT11_MAX_SSID_LEN);
- ALOGI("PNO network: SSID %s flags %x auth %x", ssid_list[i].ssid,
+ strlcpy(tmp_buf, ssid_list[i].ssid, sizeof(tmp_buf));
+ result = request.put(GSCAN_ATTRIBUTE_EPNO_SSID, tmp_buf,
+ strlen(tmp_buf));
+ ALOGI("PNO network: SSID %s flags %x auth %x", tmp_buf,
ssid_list[i].flags,
ssid_list[i].auth_bit_field);
if (result < 0) {
return result;
}
- result = request.put_u32(GSCAN_ATTRIBUTE_EPNO_SSID_LEN, strlen(ssid_list[i].ssid));
+ result = request.put_u32(GSCAN_ATTRIBUTE_EPNO_SSID_LEN,
+ strlen(tmp_buf));
if (result < 0) {
return result;
}