aboutsummaryrefslogtreecommitdiff
path: root/src/or/protover.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-02-14 10:45:57 -0500
committerNick Mathewson <nickm@torproject.org>2018-03-01 16:05:17 -0500
commita83650852d3cd00c9916cae74d755ae55a6b506d (patch)
treefa12d59b56d39f7ec3b8e2ae5f8c93e149a946a0 /src/or/protover.c
parent65f2eec694f18a64291cc85317b9f22dacc1d8e4 (diff)
downloadtor-a83650852d3cd00c9916cae74d755ae55a6b506d.tar.gz
tor-a83650852d3cd00c9916cae74d755ae55a6b506d.zip
Add another NULL-pointer fix for protover.c.
This one can only be exploited if you can generate a correctly signed consensus, so it's not as bad as 25074. Fixes bug 25251; also tracked as TROVE-2018-004.
Diffstat (limited to 'src/or/protover.c')
-rw-r--r--src/or/protover.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/protover.c b/src/or/protover.c
index a750774623..e63036f784 100644
--- a/src/or/protover.c
+++ b/src/or/protover.c
@@ -624,6 +624,11 @@ protover_all_supported(const char *s, char **missing_out)
}
smartlist_t *entries = parse_protocol_list(s);
+ if (BUG(entries == NULL)) {
+ log_warn(LD_NET, "Received an unparseable protocol list %s"
+ " from the consensus", escaped(s));
+ return 1;
+ }
missing = smartlist_new();