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 May 31, 2013
1 parent 51f100e commit 500c70c
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 @@ -2432,7 +2432,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 500c70c

Please sign in to comment.