aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-10-07 23:02:37 +0000
committerNick Mathewson <nickm@torproject.org>2003-10-07 23:02:37 +0000
commit3b2943d8453c9ae9144665913ee8fd833d92cde2 (patch)
tree7ec89f7f3feb1d52beedd084a9e80eb3bb25eb65 /src
parent9e30ac2870bf14c4939ec02f88540e65f553a357 (diff)
downloadtor-3b2943d8453c9ae9144665913ee8fd833d92cde2.tar
tor-3b2943d8453c9ae9144665913ee8fd833d92cde2.tar.gz
lowercase exit policies.
svn:r556
Diffstat (limited to 'src')
-rw-r--r--src/or/routers.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/routers.c b/src/or/routers.c
index 4aef1cf14..c0dfb800d 100644
--- a/src/or/routers.c
+++ b/src/or/routers.c
@@ -952,11 +952,13 @@ int router_add_exit_policy_from_string(routerinfo_t *router,
directory_token_t tok;
char *tmp, *cp;
int r;
- int len;
+ int len, idx;
len = strlen(s);
tmp = cp = tor_malloc(len+2);
- strcpy(tmp, s);
+ for (idx = 0; idx < len; ++idx) {
+ tmp[idx] = tolower(s[idx]);
+ }
tmp[len]='\n';
tmp[len+1]='\0';
if (router_get_next_token(&cp, &tok)) {