diff options
author | Maurizio Lombardi <mlombard@redhat.com> | 2014-02-05 10:46:56 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-07 14:10:08 -0500 |
commit | 6b89db36b3ab7c4b99027873e1de4be8d07387d4 (patch) | |
tree | 3dfa78fca726fdc6042e6e766bee31d34e3b20d4 | |
parent | ad3815a595fd7a5c5e4a24947a56eec29582a505 (diff) |
wlags49_h2: Fix overflow in wireless_set_essid()
This patch prevents the wireless_set_essid() function from overwriting
the last byte of the NetworkName buffer which must be NULL.
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/wlags49_h2/wl_wext.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wlags49_h2/wl_wext.c b/drivers/staging/wlags49_h2/wl_wext.c index 4a1ddaf5e00f..187fc060de26 100644 --- a/drivers/staging/wlags49_h2/wl_wext.c +++ b/drivers/staging/wlags49_h2/wl_wext.c | |||
@@ -1061,7 +1061,7 @@ static int wireless_set_essid(struct net_device *dev, struct iw_request_info *in | |||
1061 | goto out; | 1061 | goto out; |
1062 | } | 1062 | } |
1063 | 1063 | ||
1064 | if (data->flags != 0 && data->length > HCF_MAX_NAME_LEN + 1) { | 1064 | if (data->flags != 0 && data->length > HCF_MAX_NAME_LEN) { |
1065 | ret = -EINVAL; | 1065 | ret = -EINVAL; |
1066 | goto out; | 1066 | goto out; |
1067 | } | 1067 | } |