]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Assert that the directory server digest is given
authorcypherpunks <cypherpunks@torproject.org>
Wed, 9 Dec 2015 12:12:45 +0000 (13:12 +0100)
committerNick Mathewson <nickm@torproject.org>
Wed, 9 Dec 2015 15:22:26 +0000 (10:22 -0500)
This prevents a possible crash when memory is copied from a pointer to
NULL.

src/or/routerlist.c

index 814551521eb4f11184f5927e09a0ce44abfe2699..5e7906475f97d32c4876abd5cfede84ae1a8674b 100644 (file)
@@ -4051,6 +4051,8 @@ dir_server_new(int is_authority,
   uint32_t a;
   char *hostname_ = NULL;
 
+  tor_assert(digest);
+
   if (weight < 0)
     return NULL;