[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Don't init control authchallenge nonce as assert side effect
commit 447769dd283f642f6a84a27a10ac1f3c36ad4900
Author: Sebastian Hahn <sebastian@xxxxxxxxxxxxxx>
Date: Thu Mar 12 18:56:48 2015 +0100
Don't init control authchallenge nonce as assert side effect
Fixes part of bug 15211.
---
changes/bug15211 | 2 +-
src/or/control.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/changes/bug15211 b/changes/bug15211
index b99e61e..b14f5cb 100644
--- a/changes/bug15211
+++ b/changes/bug15211
@@ -1,5 +1,5 @@
o Minor bugfixes:
- Remove side-effects from tor_assert() calls. This was harmless,
because we never disable assertions, but it is bad style and
- unnecessary. Fixes bug 15211; bugfix on 0.2.5.5.
+ unnecessary. Fixes bug 15211; bugfix on 0.2.5.5, 0.2.2.36.
diff --git a/src/or/control.c b/src/or/control.c
index e25c3b2..819a57f 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -3102,8 +3102,8 @@ handle_control_authchallenge(control_connection_t *conn, uint32_t len,
tor_free(client_nonce);
return -1;
}
-
- tor_assert(!crypto_rand(server_nonce, SAFECOOKIE_SERVER_NONCE_LEN));
+ int fail = crypto_rand(server_nonce, SAFECOOKIE_SERVER_NONCE_LEN);
+ tor_assert(!fail);
/* Now compute and send the server-to-controller response, and the
* server's nonce. */
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits