From c76059ec9bc8ac99096b253fc4af1119f26102eb Mon Sep 17 00:00:00 2001 From: cypherpunks Date: Wed, 9 Dec 2015 13:12:45 +0100 Subject: Assert that the directory server digest is given This prevents a possible crash when memory is copied from a pointer to NULL. --- src/or/routerlist.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/or/routerlist.c') diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 814551521e..5e7906475f 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -4051,6 +4051,8 @@ dir_server_new(int is_authority, uint32_t a; char *hostname_ = NULL; + tor_assert(digest); + if (weight < 0) return NULL; -- cgit v1.2.3-54-g00ecf