summaryrefslogtreecommitdiff
path: root/src/common/crypto.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-01-10 12:07:34 -0500
committerNick Mathewson <nickm@torproject.org>2011-01-10 12:07:34 -0500
commit729f404efec0795f7ed358e7b2fa08bd62cc1ae8 (patch)
tree73f2ec66d98c01be77b885735ee67f45bb8dc6c6 /src/common/crypto.h
parent045e6ebd315db635ea80796469891bab33d1d6be (diff)
downloadtor-729f404efec0795f7ed358e7b2fa08bd62cc1ae8.tar.gz
tor-729f404efec0795f7ed358e7b2fa08bd62cc1ae8.zip
Add logic in routerparse to not read overlong private keys
I am not at all sure that it is possible to trigger a bug here, but better safe than sorry.
Diffstat (limited to 'src/common/crypto.h')
-rw-r--r--src/common/crypto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 4fb06be41d..713a988278 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -82,7 +82,7 @@ int crypto_pk_write_private_key_to_string(crypto_pk_env_t *env,
int crypto_pk_read_public_key_from_string(crypto_pk_env_t *env,
const char *src, size_t len);
int crypto_pk_read_private_key_from_string(crypto_pk_env_t *env,
- const char *s);
+ const char *s, ssize_t len);
int crypto_pk_write_private_key_to_filename(crypto_pk_env_t *env,
const char *fname);