linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] wlags49_h2: Fix overflow in wireless_set_essid()
       [not found] <1391614506-3118-1-git-send-email-mlombard@redhat.com>
@ 2014-02-05 15:46 ` Maurizio Lombardi
  0 siblings, 0 replies; only message in thread
From: Maurizio Lombardi @ 2014-02-05 15:46 UTC (permalink / raw)
  To: pe1dnn; +Cc: gregkh, linux-kernel

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>
---
 drivers/staging/wlags49_h2/wl_wext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wlags49_h2/wl_wext.c b/drivers/staging/wlags49_h2/wl_wext.c
index 4a1ddaf..187fc06 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
 		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;
 	}
-- 
Maurizio Lombardi




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-05 15:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1391614506-3118-1-git-send-email-mlombard@redhat.com>
2014-02-05 15:46 ` [PATCH RESEND] wlags49_h2: Fix overflow in wireless_set_essid() Maurizio Lombardi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).