diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-12-19 07:58:21 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-12-19 07:58:21 -0500 |
commit | c11de4c45f5611a12fba005032941a40f5ce5f66 (patch) | |
tree | cddd8d7242cdc4f48ea1f243f0a507249320fe9b /src/or/routerparse.c | |
parent | e0306320b543049bc66adb19e359b369c66fb775 (diff) | |
parent | 0fb3058eced5dce355d777288bd9ec255b875db4 (diff) | |
download | tor-c11de4c45f5611a12fba005032941a40f5ce5f66.tar.gz tor-c11de4c45f5611a12fba005032941a40f5ce5f66.zip |
Merge branch 'bug21018_024' into maint-0.2.8
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 91025c1568..4db40c8435 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -4122,7 +4122,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; @@ -5171,7 +5171,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); @@ -5203,7 +5203,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 - |