[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Tell channel_set_identity_digest() that ed keys can be NULL
commit 68acf8f12e61891f19160a58b45bad98de208df1
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Thu Nov 10 16:03:41 2016 -0500
Tell channel_set_identity_digest() that ed keys can be NULL
---
src/or/channel.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/or/channel.c b/src/or/channel.c
index e9bda24..0a96f23 100644
--- a/src/or/channel.c
+++ b/src/or/channel.c
@@ -1468,7 +1468,6 @@ channel_clear_identity_digest(channel_t *chan)
* This function sets the identity digest of the remote endpoint for a
* channel; this is intended for use by the lower layer.
*/
-
void
channel_set_identity_digest(channel_t *chan,
const char *identity_digest,
@@ -1513,6 +1512,8 @@ channel_set_identity_digest(channel_t *chan,
}
if (ed_identity) {
memcpy(&chan->ed25519_identity, ed_identity, sizeof(*ed_identity));
+ } else {
+ memset(&chan->ed25519_identity, 0, sizeof(*ed_identity));
}
/* Put it in the digest map if we should */
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits