diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-12-20 18:14:21 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-12-20 18:14:21 -0500 |
commit | a9c8a5ff18c1944ddcea0116419edc2f199583b8 (patch) | |
tree | ef32ca6e619c2c31d3ecc8da6f737a945c6cbe27 /src/or | |
parent | b49369badd28d5895f1d26b74be888298246b05a (diff) | |
parent | b18bde23cf9c0afc95a83c3bfc7205218add4ddd (diff) | |
download | tor-a9c8a5ff18c1944ddcea0116419edc2f199583b8.tar.gz tor-a9c8a5ff18c1944ddcea0116419edc2f199583b8.zip |
Merge branch 'maint-0.2.6' into maint-0.2.7
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/rendcache.c | 6 | ||||
-rw-r--r-- | src/or/routerparse.c | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/or/rendcache.c b/src/or/rendcache.c index d4bdd68698..e7b1ce979a 100644 --- a/src/or/rendcache.c +++ b/src/or/rendcache.c @@ -801,8 +801,10 @@ rend_cache_store_v2_desc_as_client(const char *desc, intro_size); if (n_intro_points <= 0) { log_warn(LD_REND, "Failed to parse introduction points. Either the " - "service has published a corrupt descriptor or you have " - "provided invalid authorization data."); + "service has published a corrupt descriptor, or you have " + "provided invalid authorization data, or (maybe!) the " + "server is deliberately serving broken data in an attempt " + "to crash you with bug 21018."); goto err; } else if (n_intro_points > MAX_INTRO_POINTS) { log_warn(LD_REND, "Found too many introduction points on a hidden " diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 6b6e21d5d0..7804af934f 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -4104,7 +4104,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; @@ -5153,7 +5153,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); @@ -5185,7 +5185,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 - |