[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Assert that the directory server digest is given



commit c76059ec9bc8ac99096b253fc4af1119f26102eb
Author: cypherpunks <cypherpunks@xxxxxxxxxxxxxx>
Date:   Wed Dec 9 13:12:45 2015 +0100

    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(+)

diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 8145515..5e79064 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;
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits