]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Set or_ap/dir_ap.port on the invalid addr case. Bug in no released Tor. CID 1353178...
authorNick Mathewson <nickm@torproject.org>
Tue, 16 Feb 2016 17:58:02 +0000 (12:58 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 16 Feb 2016 17:58:02 +0000 (12:58 -0500)
src/or/directory.c

index fc610d05c45ab0ef984a2ee070a806978ce7aa03..ecf6da8ac1ecf814f2e116ce85c49bb676c91ea4 100644 (file)
@@ -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,