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

[tor-commits] [tor/master] Handle NULL argument to get_configured_bridge_by_addr_port_digest



commit 21ed575826e701437f7893536ffc5c8d2a71532f
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue May 17 19:46:47 2011 -0400

    Handle NULL argument to get_configured_bridge_by_addr_port_digest
    
    Fixes bug 2313; bugfix on 0.2.2.26-beta.
---
 changes/bug3213       |    4 ++++
 src/or/circuitbuild.c |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/changes/bug3213 b/changes/bug3213
new file mode 100644
index 0000000..ab7de2d
--- /dev/null
+++ b/changes/bug3213
@@ -0,0 +1,4 @@
+  o Major bugfixes:
+    - Fix a crash bug when changing bridges in a running Tor process.
+      Fixes bug 3213; bugfix on 0.2.2.26-beta.
+
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 860cd27..2f86e1f 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -4539,7 +4539,7 @@ get_configured_bridge_by_addr_port_digest(const tor_addr_t *addr,
           !tor_addr_compare(&bridge->addr, addr, CMP_EXACT) &&
           bridge->port == port)
         return bridge;
-      if (tor_memeq(bridge->identity, digest, DIGEST_LEN))
+      if (digest && tor_memeq(bridge->identity, digest, DIGEST_LEN))
         return bridge;
     }
   SMARTLIST_FOREACH_END(bridge);



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