]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make sure that routerlists contain only routers; give a better error message if they...
authorNick Mathewson <nickm@torproject.org>
Tue, 28 Sep 2004 22:49:34 +0000 (22:49 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 28 Sep 2004 22:49:34 +0000 (22:49 +0000)
svn:r2393

src/or/routerlist.c

index 900dd4455a2ba3169e6015c1ec67282eac51af40..3c4e39ff615775aff32ce47eae0ea1e2763b50ec 100644 (file)
@@ -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)