Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b89db36 authored by Maurizio Lombardi's avatar Maurizio Lombardi Committed by Greg Kroah-Hartman
Browse files

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: default avatarMaurizio Lombardi <mlombard@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ad3815a5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}