* [PATCH v2] wlags49_h2: Fix overflow in wireless_set_essid()
@ 2013-11-27 9:30 Maurizio Lombardi
0 siblings, 0 replies; 2+ messages in thread
From: Maurizio Lombardi @ 2013-11-27 9:30 UTC (permalink / raw)
To: pe1dnn; +Cc: linux-kernel, Maurizio Lombardi
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 c731ff2..62ad158 100644
--- a/drivers/staging/wlags49_h2/wl_wext.c
+++ b/drivers/staging/wlags49_h2/wl_wext.c
@@ -1127,7 +1127,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;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH v2] wlags49_h2: Fix overflow in wireless_set_essid()
[not found] <1385643047-8725-1-git-send-email-mlombard@redhat.com>
@ 2013-11-28 12:52 ` Maurizio Lombardi
0 siblings, 0 replies; 2+ messages in thread
From: Maurizio Lombardi @ 2013-11-28 12:52 UTC (permalink / raw)
To: pe1dnn; +Cc: 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 c731ff2..62ad158 100644
--- a/drivers/staging/wlags49_h2/wl_wext.c
+++ b/drivers/staging/wlags49_h2/wl_wext.c
@@ -1127,7 +1127,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;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-28 19:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1385643047-8725-1-git-send-email-mlombard@redhat.com>
2013-11-28 12:52 ` [PATCH v2] wlags49_h2: Fix overflow in wireless_set_essid() Maurizio Lombardi
2013-11-27 9:30 Maurizio Lombardi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox