summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-01-04 06:36:43 +0000
committerRoger Dingledine <arma@torproject.org>2007-01-04 06:36:43 +0000
commita66d86149b04bf28617603190b3488d6f71231a2 (patch)
treed6c55c4faa2a1986a5fe1aeee70af2186fe0e1d6
parentda2ff14839eb8a3d4d5ff247184e9c380d0bbe18 (diff)
downloadtor-a66d86149b04bf28617603190b3488d6f71231a2.tar.gz
tor-a66d86149b04bf28617603190b3488d6f71231a2.zip
avoid a crash-all-the-clients segfault if a rogue dir
authority leaves a "v" line blank. svn:r9262
-rw-r--r--src/or/routerparse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 8cd08d6b12..64c6152db8 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -1081,7 +1081,7 @@ routerstatus_parse_entry_from_string(const char **s, smartlist_t *tokens)
rs->is_bad_directory = 1;
}
}
- if ((tok = find_first_by_keyword(tokens, K_V))) {
+ if ((tok = find_first_by_keyword(tokens, K_V)) && tok->n_args) {
rs->version_known = 1;
if (strcmpstart(tok->args[0], "Tor ")) {
rs->version_supports_begindir = 1;