summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-05-07 21:53:31 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-05-07 21:53:31 +0000
commitdf369a168dfc5dbcd23fd38004c3f9e5838a0d18 (patch)
treeb3f063a2db0b7e41af07b705f8dac4830d2fb11e
parentad8acacae82e4b6a560fdb7d3f6b276dec688237 (diff)
parentf632b64f225162de0c7e8dee5953d44bbfcf353f (diff)
downloadplatform_hardware_broadcom_wlan-df369a168dfc5dbcd23fd38004c3f9e5838a0d18.tar.gz
platform_hardware_broadcom_wlan-df369a168dfc5dbcd23fd38004c3f9e5838a0d18.tar.bz2
platform_hardware_broadcom_wlan-df369a168dfc5dbcd23fd38004c3f9e5838a0d18.zip
Snap for 5450365 from f632b64f225162de0c7e8dee5953d44bbfcf353f to pi-platform-releasepie-platform-release
Change-Id: I5154524039cabafbc8339db54d55d4c493aafad4
-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;
}