summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-01-05 01:23:34 +0000
committerRoger Dingledine <arma@torproject.org>2007-01-05 01:23:34 +0000
commit466650aa14459bf6a2553f6c500f41c164b46712 (patch)
tree1757179ebf92fa76aa752fefdc9c343b01bb8024
parent7b883806900e9db9f9fb0aded90e4a4df7b98099 (diff)
downloadtor-466650aa14459bf6a2553f6c500f41c164b46712.tar.gz
tor-466650aa14459bf6a2553f6c500f41c164b46712.zip
when we added orport= to the dirserver line, we started
freeing the string in the middle. this was probably xiando's crash bug. svn:r9265
-rw-r--r--src/or/config.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 19e1a302b7..e975e73801 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3365,10 +3365,11 @@ parse_dir_server_line(const char *line, int validate_only)
is_v2_authority = 0;
} else if (!strcasecmpstart(flag, "orport=")) {
int ok;
- flag += strlen("orport=");
- or_port = (uint16_t) tor_parse_long(flag, 10, 1, 65535, &ok, NULL);
+ char *portstring = flag + strlen("orport=");
+ or_port = (uint16_t) tor_parse_long(portstring, 10, 1, 65535, &ok, NULL);
if (!ok)
- log_warn(LD_CONFIG, "Invalid orport '%s' on DirServer line.", flag);
+ log_warn(LD_CONFIG, "Invalid orport '%s' on DirServer line.",
+ portstring);
} else {
log_warn(LD_CONFIG, "Unrecognized flag '%s' on DirServer line",
flag);