Browse Source

avoid a crash-all-the-clients segfault if a rogue dir
authority leaves a "v" line blank.


svn:r9262

Roger Dingledine 17 years ago
parent
commit
a66d86149b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/or/routerparse.c

+ 1 - 1
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;