diff options
author | David Kilroy <kilroyd@googlemail.com> | 2011-09-25 07:30:19 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-27 00:46:32 (GMT) |
commit | e7751b6384596cc9a2646f037a03ad57f6201f6d (patch) | |
tree | dbc4023143d691281aa7948fbfb7583d9ede570d /drivers/staging/wlags49_h2 | |
parent | 145a401fc43fa82cf1aad55bc35a7f6c5bbd1ecb (diff) | |
download | linux-fsl-qoriq-e7751b6384596cc9a2646f037a03ad57f6201f6d.tar.xz |
staging: wlags49_h2: Stop playing with length in GIWESSID handler
WE21 clarified that ESSID should not be NULL terminated.
The existing code didn't NULL terminate, but did play with length
and then reset it again. Just stop it.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/wlags49_h2')
-rw-r--r-- | drivers/staging/wlags49_h2/wl_wext.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/staging/wlags49_h2/wl_wext.c b/drivers/staging/wlags49_h2/wl_wext.c index 80bd938..1f6b4dc 100644 --- a/drivers/staging/wlags49_h2/wl_wext.c +++ b/drivers/staging/wlags49_h2/wl_wext.c @@ -1042,9 +1042,6 @@ static int wireless_get_essid(struct net_device *dev, struct iw_request_info *in /* Copy the information into the user buffer */ data->length = pName->length; - /* NOTE: Null terminating is necessary for proper display of the SSID in - the wireless tools */ - data->length = pName->length + 1; if( pName->length < HCF_MAX_NAME_LEN ) { pName->name[pName->length] = '\0'; } @@ -1070,11 +1067,7 @@ static int wireless_get_essid(struct net_device *dev, struct iw_request_info *in pName->length = CNV_LITTLE_TO_INT( pName->length ); /* Copy the information into the user buffer */ - data->length = pName->length + 1; - if( pName->length < HCF_MAX_NAME_LEN ) { - pName->name[pName->length] = '\0'; - } - + data->length = pName->length; data->flags = 1; } else { ret = -EFAULT; @@ -1084,8 +1077,6 @@ static int wireless_get_essid(struct net_device *dev, struct iw_request_info *in #endif // HCF_STA - data->length--; - if (pName->length > IW_ESSID_MAX_SIZE) { ret = -EFAULT; goto out_unlock; |