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>
This commit is contained in:
Maurizio Lombardi 2014-02-05 16:46:56 +01:00 committed by Greg Kroah-Hartman
parent ad3815a595
commit 6b89db36b3
1 changed files with 1 additions and 1 deletions

View File

@ -1061,7 +1061,7 @@ static int wireless_set_essid(struct net_device *dev, struct iw_request_info *in
goto out;
}
if (data->flags != 0 && data->length > HCF_MAX_NAME_LEN + 1) {
if (data->flags != 0 && data->length > HCF_MAX_NAME_LEN) {
ret = -EINVAL;
goto out;
}