diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-03-17 20:10:57 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-03-17 20:10:57 +0000 |
commit | e17e6371d1b2ef034f0860a19e5825cae61600be (patch) | |
tree | b567063304e176e28dc668e422675c0a05d0b9b6 /src/or/routerparse.c | |
parent | 80ec9e51dd0320d0d106ace510efe057b448f974 (diff) | |
download | tor-e17e6371d1b2ef034f0860a19e5825cae61600be.tar.gz tor-e17e6371d1b2ef034f0860a19e5825cae61600be.zip |
r18896@catbus: nickm | 2008-03-17 16:10:54 -0400
Fix bug in earlier bugfix. Note stupidness of allowing NULL policies at all. Disallow empty exit policies in router descriptors.
svn:r14082
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 1b77d992a3..31b10baf30 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -1272,6 +1272,10 @@ router_parse_entry_from_string(const char *s, const char *end, } exit_policy_tokens = find_all_exitpolicy(tokens); + if (!smartlist_len(exit_policy_tokens)) { + log_warn(LD_DIR, "No exit policy tokens in descriptor."); + goto err; + } SMARTLIST_FOREACH(exit_policy_tokens, directory_token_t *, t, if (router_add_exit_policy(router,t)<0) { log_warn(LD_DIR,"Error in exit policy"); |