mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Use fast check for missing id in node_is_a_configured_bridge()
Fixes bug 30308; bugfix on 0.3.5.1-alpha.
This commit is contained in:
parent
650b94ebc1
commit
806539b40a
5
changes/ticket30308
Normal file
5
changes/ticket30308
Normal file
@ -0,0 +1,5 @@
|
||||
o Minor bugfixes (performance):
|
||||
- When checking a node for bridge status, use a fast check to make sure
|
||||
that its identity is set. Previously, we used a constant-time check,
|
||||
which is not necessary when verifying a BUG() condition that causes
|
||||
a stack trace. Fixes bug 30308; bugfix on 0.3.5.1-alpha.
|
@ -348,7 +348,7 @@ int
|
||||
node_is_a_configured_bridge(const node_t *node)
|
||||
{
|
||||
/* First, let's try searching for a bridge with matching identity. */
|
||||
if (BUG(tor_digest_is_zero(node->identity)))
|
||||
if (BUG(tor_mem_is_zero(node->identity, DIGEST_LEN)))
|
||||
return 0;
|
||||
|
||||
if (find_bridge_by_digest(node->identity) != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user