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

svn:r2393
This commit is contained in:
Nick Mathewson
2004-09-28 22:49:34 +00:00
parent 0c653e5cc7
commit 11384b6d92
+4
View 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)