summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-11-07 10:44:02 -0500
committerNick Mathewson <nickm@torproject.org>2011-11-07 10:44:02 -0500
commit51f53b590ee15c972adcff9e7d94c904a9267ac2 (patch)
treeeb0d3809d3eeb64056538bbf60a745c0a0465eab /src/or/routerparse.c
parent350fe952590fdfd1711aaaddcb478cdea20b6e6a (diff)
parent4d8306e0e92200e1a25a073480ec342e22e590b7 (diff)
downloadtor-51f53b590ee15c972adcff9e7d94c904a9267ac2.tar.gz
tor-51f53b590ee15c972adcff9e7d94c904a9267ac2.zip
Merge remote-tracking branch 'origin/maint-0.2.2'
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index e8b2dd7d2b..4ea7b964cf 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -4886,6 +4886,11 @@ rend_decrypt_introduction_points(char **ipos_decrypted,
crypto_cipher_env_t *cipher;
char *dec;
int declen;
+ if (ipos_encrypted_size < CIPHER_IV_LEN + 2) {
+ log_warn(LD_REND, "Size of encrypted introduction points is too "
+ "small.");
+ return -1;
+ }
dec = tor_malloc_zero(ipos_encrypted_size - CIPHER_IV_LEN - 1);
cipher = crypto_create_init_cipher(descriptor_cookie, 0);
declen = crypto_cipher_decrypt_with_iv(cipher, dec,