Skip to content

Commit

Permalink
Honour escaped slashes in regular expressions.
Browse files Browse the repository at this point in the history
Closes RADSECPROXY-51.
  • Loading branch information
Linus Nordberg committed Sep 2, 2013
1 parent 5fd15c1 commit 05b3606
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion radsecproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 05b3606

Please sign in to comment.