From: Linus Nordberg Date: Fri, 31 May 2013 12:10:49 +0000 (+0200) Subject: Honour escaped slashes in regular expressions. X-Git-Tag: radsecproxy-1.6.3-rc0~12 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=radsecproxy.git;a=commitdiff_plain;h=05b360612d4f1bb48caedc766ede2109024bdc6f Honour escaped slashes in regular expressions. Closes RADSECPROXY-51. --- diff --git a/radsecproxy.c b/radsecproxy.c index 8489a18..e919ceb 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -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';