Skip to content

Commit

Permalink
wlags49_h2: Fix overflow in wireless_set_essid()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maurizio Lombardi authored and Greg Kroah-Hartman committed Feb 7, 2014
1 parent ad3815a commit 6b89db3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/wlags49_h2/wl_wext.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6b89db3

Please sign in to comment.