[arch-projects] [wpa_actiond] [PATCH (untested)] Fix action call for profile names that contain ']'.
Thomas Bächler
thomas at archlinux.org
Tue Feb 28 04:26:45 EST 2012
Fixes FS#24599
---
wpa_actiond.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wpa_actiond.c b/wpa_actiond.c
index 84eef63..69eb6f2 100644
--- a/wpa_actiond.c
+++ b/wpa_actiond.c
@@ -188,7 +188,7 @@ static void parse_wpa_event(const char *msg, enum wpaevent *ev, char *idstr)
pos = strstr(pos, "id_str=");
if(pos != NULL) {
pos += strlen("id_str=");
- pos2 = index(pos, ']');
+ pos2 = rindex(pos, ']');
strncpy(idstr, pos, min(pos2-pos, IDSTRLEN-1));
idstr[min(pos2-pos, IDSTRLEN-1)] = '\0';
}
--
1.7.9.2
More information about the arch-projects
mailing list