diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-05-03 12:52:29 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-05-16 08:25:59 -0400 |
commit | ec81329339429182169c27f05c35e86ae9325267 (patch) | |
tree | c5d2ddfb82acfda50ace8f22a70ca33b082ef608 /src | |
parent | 5b91e70a4f0020e7ea70a134f62a28f4633a8085 (diff) | |
download | tor-ec81329339429182169c27f05c35e86ae9325267.tar.gz tor-ec81329339429182169c27f05c35e86ae9325267.zip |
Do not leak the 'tag' when trying to read a truncated ed25519 key file
Fix for bug 18956.
Diffstat (limited to 'src')
-rw-r--r-- | src/common/crypto_ed25519.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/crypto_ed25519.c b/src/common/crypto_ed25519.c index 654611553e..c687a1b246 100644 --- a/src/common/crypto_ed25519.c +++ b/src/common/crypto_ed25519.c @@ -433,6 +433,7 @@ ed25519_seckey_read_from_file(ed25519_secret_key_t *seckey_out, errno = EINVAL; } + tor_free(*tag_out); return -1; } @@ -472,6 +473,7 @@ ed25519_pubkey_read_from_file(ed25519_public_key_t *pubkey_out, errno = EINVAL; } + tor_free(*tag_out); return -1; } |