diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-01-31 18:28:22 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-01-31 18:28:22 +0000 |
commit | c283368f60de1d93402199fd138c813fcbc8f843 (patch) | |
tree | 09e4e5335886140fe2f58b054d3cf428e7a0f9e7 | |
parent | 66be733bbb8568ae58dd74d87a7e7b54b41c38ad (diff) | |
download | tor-c283368f60de1d93402199fd138c813fcbc8f843.tar.gz tor-c283368f60de1d93402199fd138c813fcbc8f843.zip |
Backport r18354: Fix a possible cause of bug 915 when parsing multiple votes one of which was bad. Bugfix on 0.2.0.8-alpha.
svn:r18355
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/or/routerparse.c | 3 |
2 files changed, 7 insertions, 0 deletions
@@ -1,4 +1,8 @@ Changes in version 0.2.0.34 - 2009-??-?? + o Major bugfixes: + - Fix an infinite-loop bug on handling corrupt votes under certain + circumstances. Bugfix on 0.2.0.8-alpha. + o Minor bugfixes: - Fix compilation on systems where time_t is a 64-bit integer. Patch from Matthias Drochner. diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 1bbd483bce..7524e7205a 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -2011,6 +2011,9 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out, struct in_addr in; int i, inorder, n_signatures = 0; + if (eos_out) + *eos_out = NULL; + if (router_get_networkstatus_v3_hash(s, ns_digest)) { log_warn(LD_DIR, "Unable to compute digest of network-status"); goto err; |