From: cypherpunks Date: Wed, 9 Dec 2015 12:12:45 +0000 (+0100) Subject: Assert that the directory server digest is given X-Git-Tag: tor-0.2.8.1-alpha~177^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c76059ec9bc8ac99096b253fc4af1119f26102eb;p=thirdparty%2Ftor.git Assert that the directory server digest is given This prevents a possible crash when memory is copied from a pointer to NULL. --- 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;