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

[tor-commits] [tor/master] Set or_ap/dir_ap.port on the invalid addr case. Bug in no released Tor. CID 1353178 and 1353179.



commit 549493846782efa7d6655317844782b6acade1b2
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Feb 16 12:58:02 2016 -0500

    Set or_ap/dir_ap.port on the invalid addr case. Bug in no released Tor. CID 1353178 and 1353179.
---
 src/or/directory.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/or/directory.c b/src/or/directory.c
index fc610d0..ecf6da8 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -1004,7 +1004,7 @@ directory_initiate_command(const tor_addr_t *or_addr, uint16_t or_port,
   } else {
     /* the family doesn't matter here, so make it IPv4 */
     tor_addr_make_null(&or_ap.addr, AF_INET);
-    or_port = 0;
+    or_ap.port = or_port = 0;
   }
 
   if (tor_addr_port_is_valid(dir_addr, dir_port, 0)) {
@@ -1013,7 +1013,7 @@ directory_initiate_command(const tor_addr_t *or_addr, uint16_t or_port,
   } else {
     /* the family doesn't matter here, so make it IPv4 */
     tor_addr_make_null(&dir_ap.addr, AF_INET);
-    dir_port = 0;
+    dir_ap.port = dir_port = 0;
   }
 
   directory_initiate_command_rend(&or_ap, &dir_ap,

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