summaryrefslogtreecommitdiffstats
path: root/bcmdhd/wpa_supplicant_8_lib/driver_cmd_wext.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2013-10-28 16:45:22 -0700
committerDmitry Shmidt <dimitrysh@google.com>2013-10-28 16:45:22 -0700
commit4cb2abcc3c92ac1386e821950b472a8c24fb87c8 (patch)
tree6f1527e962b149b4506a4cae5783ca9ac550162e /bcmdhd/wpa_supplicant_8_lib/driver_cmd_wext.c
parentcca98f83e1dc212a0978897a86c3628baf5d9a0f (diff)
downloadhardware_broadcom_wlan-4cb2abcc3c92ac1386e821950b472a8c24fb87c8.zip
hardware_broadcom_wlan-4cb2abcc3c92ac1386e821950b472a8c24fb87c8.tar.gz
hardware_broadcom_wlan-4cb2abcc3c92ac1386e821950b472a8c24fb87c8.tar.bz2
bcmdhd: Replace os_strncpy with os_strlcpy
Change-Id: I13e64bde048bfdf3f007d6e41a8fe731739336ae Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'bcmdhd/wpa_supplicant_8_lib/driver_cmd_wext.c')
-rw-r--r--bcmdhd/wpa_supplicant_8_lib/driver_cmd_wext.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bcmdhd/wpa_supplicant_8_lib/driver_cmd_wext.c b/bcmdhd/wpa_supplicant_8_lib/driver_cmd_wext.c
index 6aa435a..3734cb0 100644
--- a/bcmdhd/wpa_supplicant_8_lib/driver_cmd_wext.c
+++ b/bcmdhd/wpa_supplicant_8_lib/driver_cmd_wext.c
@@ -115,7 +115,7 @@ int wpa_driver_wext_combo_scan(void *priv, struct wpa_driver_scan_params *params
buf[bp++] = (u8)(WEXT_CSCAN_HOME_DWELL_TIME >> 8);
os_memset(&iwr, 0, sizeof(iwr));
- os_strncpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
+ os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
iwr.u.data.pointer = buf;
iwr.u.data.length = bp;
@@ -258,7 +258,7 @@ static int wpa_driver_set_backgroundscan_params(void *priv)
bp += WEXT_PNO_MAX_REPEAT_LENGTH + 1;
os_memset(&iwr, 0, sizeof(iwr));
- os_strncpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
+ os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
iwr.u.data.pointer = buf;
iwr.u.data.length = bp;
@@ -293,7 +293,7 @@ int wpa_driver_wext_driver_cmd( void *priv, char *cmd, char *buf, size_t buf_len
}
if (os_strcasecmp(cmd, "RSSI-APPROX") == 0) {
- os_strncpy(cmd, RSSI_CMD, MAX_DRV_CMD_SIZE);
+ os_strlcpy(cmd, RSSI_CMD, MAX_DRV_CMD_SIZE);
} else if( os_strncasecmp(cmd, "SCAN-CHANNELS", 13) == 0 ) {
int no_of_chan;
@@ -311,15 +311,15 @@ int wpa_driver_wext_driver_cmd( void *priv, char *cmd, char *buf, size_t buf_len
if (ret < 0) {
return ret;
}
- os_strncpy(cmd, "PNOFORCE 1", MAX_DRV_CMD_SIZE);
+ os_strlcpy(cmd, "PNOFORCE 1", MAX_DRV_CMD_SIZE);
drv->bgscan_enabled = 1;
} else if( os_strcasecmp(cmd, "BGSCAN-STOP") == 0 ) {
- os_strncpy(cmd, "PNOFORCE 0", MAX_DRV_CMD_SIZE);
+ os_strlcpy(cmd, "PNOFORCE 0", MAX_DRV_CMD_SIZE);
drv->bgscan_enabled = 0;
}
os_memset(&iwr, 0, sizeof(iwr));
- os_strncpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
+ os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
os_memcpy(buf, cmd, strlen(cmd) + 1);
iwr.u.data.pointer = buf;
iwr.u.data.length = buf_len;