diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-06-27 14:14:13 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-06-27 14:14:13 -0400 |
commit | 48f69685f5df3ca0f39a3da155df3b9a5cfa2b99 (patch) | |
tree | f047325f83d5b47c16a86001f49e069913dd5ed1 /src/or | |
parent | 80fb1ef8ba8406f7ed335d7ffd06cdf058cca80f (diff) | |
download | tor-48f69685f5df3ca0f39a3da155df3b9a5cfa2b99.tar.gz tor-48f69685f5df3ca0f39a3da155df3b9a5cfa2b99.zip |
Avoid a segfault when reading an encrypted key that isn't there
Patch from cypherpunks. Fixes bug 16449. Bug not in any released tor.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/routerkeys.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/routerkeys.c b/src/or/routerkeys.c index 2fd7f41a8d..d075c67e6a 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) { |