[tor-commits] [tor/master] Avoid a segfault when reading an encrypted key that isn't there

nickm at torproject.org nickm at torproject.org
Sat Jun 27 18:16:26 UTC 2015


commit 48f69685f5df3ca0f39a3da155df3b9a5cfa2b99
Author: Nick Mathewson <nickm at torproject.org>
Date:   Sat Jun 27 14:14:13 2015 -0400

    Avoid a segfault when reading an encrypted key that isn't there
    
    Patch from cypherpunks. Fixes bug 16449. Bug not in any released tor.
---
 src/or/routerkeys.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/or/routerkeys.c b/src/or/routerkeys.c
index 2fd7f41..d075c67 100644
--- a/src/or/routerkeys.c
+++ b/src/or/routerkeys.c
@@ -63,7 +63,7 @@ read_encrypted_secret_key(ed25519_secret_key_t *out,
   r = 1;
 
  done:
-  memwipe(encrypted_key, 0, encrypted_len);
+  memwipe(encrypted_key, 0, sizeof(encrypted_key));
   memwipe(pwbuf, 0, sizeof(pwbuf));
   tor_free(tag);
   if (secret) {



More information about the tor-commits mailing list