summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-12-19 08:03:17 -0500
committerNick Mathewson <nickm@torproject.org>2016-12-19 08:03:17 -0500
commitf9f1e3c94b6758e794abac8517474515101a6fd3 (patch)
tree2e18ec06c5c992e8c4be8680ea1c0786637e0f6d /src/or/routerparse.c
parent2dc522664420163eeea87b8a5bdab5eaabd9b2e2 (diff)
parentde656474611c43f24dd5fff430de945b34b738bf (diff)
downloadtor-f9f1e3c94b6758e794abac8517474515101a6fd3.tar.gz
tor-f9f1e3c94b6758e794abac8517474515101a6fd3.zip
Merge branch 'maint-0.2.9'
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 068e226f61..d763a63d84 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -5250,7 +5250,7 @@ rend_decrypt_introduction_points(char **ipos_decrypted,
crypto_cipher_free(cipher);
len = ipos_encrypted_size - 2 - client_entries_len - CIPHER_IV_LEN;
- dec = tor_malloc(len);
+ dec = tor_malloc_zero(len + 1);
declen = crypto_cipher_decrypt_with_iv(session_key, dec, len,
ipos_encrypted + 2 + client_entries_len,
ipos_encrypted_size - 2 - client_entries_len);
@@ -5282,7 +5282,7 @@ rend_decrypt_introduction_points(char **ipos_decrypted,
"small.");
return -1;
}
- dec = tor_malloc_zero(ipos_encrypted_size - CIPHER_IV_LEN - 1);
+ dec = tor_malloc_zero(ipos_encrypted_size - CIPHER_IV_LEN - 1 + 1);
declen = crypto_cipher_decrypt_with_iv(descriptor_cookie, dec,
ipos_encrypted_size -