From 11384b6d925e9629d373213495eb8d02edf2e678 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 28 Sep 2004 22:49:34 +0000 Subject: Make sure that routerlists contain only routers; give a better error message if they start with a nonrouter. svn:r2393 --- src/or/routerlist.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 900dd4455a..3c4e39ff61 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) -- cgit v1.2.3-54-g00ecf