From: Nick Mathewson Date: Tue, 28 Sep 2004 22:49:34 +0000 (+0000) Subject: Make sure that routerlists contain only routers; give a better error message if they... X-Git-Tag: tor-0.0.9pre1~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11384b6d925e9629d373213495eb8d02edf2e678;p=thirdparty%2Ftor.git Make sure that routerlists contain only routers; give a better error message if they start with a nonrouter. svn:r2393 --- 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)