aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-09-28 22:49:34 +0000
committerNick Mathewson <nickm@torproject.org>2004-09-28 22:49:34 +0000
commit11384b6d925e9629d373213495eb8d02edf2e678 (patch)
treefde8965fa799168c22aa9676c9ea66b4ba545303 /src/or/routerlist.c
parent0c653e5cc7235c4d10e80644e62d9dc312fcfda5 (diff)
downloadtor-11384b6d925e9629d373213495eb8d02edf2e678.tar
tor-11384b6d925e9629d373213495eb8d02edf2e678.tar.gz
Make sure that routerlists contain only routers; give a better error message if they start with a nonrouter.
svn:r2393
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 900dd4455..3c4e39ff6 100644
--- a/src/or/routerlist.c
+++ b/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)