richard
2007-01-04 11:21:38 UTC
if the wireless extension interface is passed a null string for the ssid
in siwessid, autojoin tries to trim the trailing null and can oops.
I've never been able to trap the oops stack trace so I don't know
exactly where the problem occurs, but this patch fixes it .
Cheers
Richard
Index: src/p80211/p80211wext.c
===================================================================
--- src/p80211/p80211wext.c (revision 1805)
+++ src/p80211/p80211wext.c (working copy)
@@ -183,7 +183,7 @@
/* Trim the last '\0' to fit the SSID format */
- if (ssid[data.length-1] == '\0') {
+ if (data.length && ssid[data.length-1] == '\0') {
data.length = data.length - 1;
}
in siwessid, autojoin tries to trim the trailing null and can oops.
I've never been able to trap the oops stack trace so I don't know
exactly where the problem occurs, but this patch fixes it .
Cheers
Richard
Index: src/p80211/p80211wext.c
===================================================================
--- src/p80211/p80211wext.c (revision 1805)
+++ src/p80211/p80211wext.c (working copy)
@@ -183,7 +183,7 @@
/* Trim the last '\0' to fit the SSID format */
- if (ssid[data.length-1] == '\0') {
+ if (data.length && ssid[data.length-1] == '\0') {
data.length = data.length - 1;
}