diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-12-20 18:11:25 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-12-20 18:11:25 -0500 |
commit | b18bde23cf9c0afc95a83c3bfc7205218add4ddd (patch) | |
tree | ba5e7e68771c928e10250f75bb6802f0fd777a65 /src/or/routerparse.c | |
parent | 3d9f8ff6a5c37e9f124f8111f904b97f095ca621 (diff) | |
parent | db58d4d16ff156b8827198b2732646c73eb59f14 (diff) | |
download | tor-b18bde23cf9c0afc95a83c3bfc7205218add4ddd.tar.gz tor-b18bde23cf9c0afc95a83c3bfc7205218add4ddd.zip |
Merge branch 'maint-0.2.5' into maint-0.2.6
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index dcf419798a..22d1a27f39 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -3724,7 +3724,7 @@ get_next_token(memarea_t *area, if (tok->tp == ERR_) { /* No keyword matched; call it an "K_opt" or "A_unrecognized" */ - if (**s == '@') + if (*s < eol && **s == '@') tok->tp = A_UNKNOWN_; else tok->tp = K_OPT; @@ -4763,7 +4763,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); @@ -4795,7 +4795,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 - |