Browse Source

Make sure that routerlists contain only routers; give a better error message if they start with a nonrouter.

svn:r2393
Nick Mathewson 21 years ago
parent
commit
11384b6d92
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/or/routerlist.c

+ 4 - 0
src/or/routerlist.c

@@ -748,6 +748,10 @@ int router_load_routerlist_from_string(const char *s, int trusted)
     log(LOG_WARN, "Error parsing router file");
     return -1;
   }
+  if (*s) {
+    log(LOG_WARN, "Extraneous text at start of router file");
+    return -1;
+  }
   if (trusted) {
     int i;
     if (!trusted_dir_digests)