Honour escaped slashes in regular expressions.
[radsecproxy.git] / radsecproxy.c
index 8489a18..e919ceb 100644 (file)
@@ -2445,7 +2445,9 @@ struct modattr *extractmodattr(char *nameval) {
     if (s[strlen(s) - 1] == '/')
        s[strlen(s) - 1] = '\0';
 
-    t = strchr(s, '/');
+    for (t = strchr(s, '/'); t; t = strchr(t+1, '/'))
+        if (t == s || t[-1] != '\\')
+            break;
     if (!t)
        return NULL;
     *t = '\0';