diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-09-06 20:55:31 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-09-06 20:55:31 -0400 |
commit | 9ef2cd7776ecb91b74c1db58d8fbd9111238f458 (patch) | |
tree | 8902caf218f7207c35eaee8680a8837a2234f27f | |
parent | 7ca16affb5722561a5d50b1820328d1833a9099e (diff) | |
parent | 2bf0e7479bc9ec26496405ff6a1ef830cacc001b (diff) | |
download | tor-9ef2cd7776ecb91b74c1db58d8fbd9111238f458.tar.gz tor-9ef2cd7776ecb91b74c1db58d8fbd9111238f458.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts:
src/or/connection_edge.c
Conflicted on a router->node transition; fix was easy.
-rw-r--r-- | changes/bug3923 | 5 | ||||
-rw-r--r-- | src/or/connection_edge.c | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/changes/bug3923 b/changes/bug3923 new file mode 100644 index 0000000000..9c0e138826 --- /dev/null +++ b/changes/bug3923 @@ -0,0 +1,5 @@ + o Major bugfies: + - Avoid an assertion failure when reloading a configuration with + TrackExitHosts changes. Found and fixed by 'laruldan'. Fixes + bug 3923; bugfix on 0.2.2.25-alpha. + diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 72c42249db..7028764581 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -930,12 +930,10 @@ addressmap_clear_excluded_trackexithosts(const or_options_t *options) if (len < 6) continue; /* malformed. */ dot = target + len - 6; /* dot now points to just before .exit */ - dot = strrchr(dot, '.'); /* dot now points to the . before .exit or NULL */ - if (!dot) { - nodename = tor_strndup(target, len-5); - } else { - nodename = tor_strndup(dot+1, strlen(dot+1)-5); - } + while(dot > target && *dot != '.') + dot--; + if (*dot == '.') dot++; + nodename = tor_strndup(dot, len-5-(dot-target));; node = node_get_by_nickname(nodename, 0); tor_free(nodename); if (!node || |