mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
Fix a crash bug when serving microdescs on a bufferevent.
This commit is contained in:
parent
d0f1f9ce9e
commit
9fe3cd0be3
@ -3457,7 +3457,7 @@ connection_dirserv_add_microdescs_to_outbuf(dir_connection_t *conn)
|
|||||||
{
|
{
|
||||||
microdesc_cache_t *cache = get_microdesc_cache();
|
microdesc_cache_t *cache = get_microdesc_cache();
|
||||||
while (smartlist_len(conn->fingerprint_stack) &&
|
while (smartlist_len(conn->fingerprint_stack) &&
|
||||||
buf_datalen(conn->_base.outbuf) < DIRSERV_BUFFER_MIN) {
|
connection_get_outbuf_len(TO_CONN(conn)) < DIRSERV_BUFFER_MIN) {
|
||||||
char *fp256 = smartlist_pop_last(conn->fingerprint_stack);
|
char *fp256 = smartlist_pop_last(conn->fingerprint_stack);
|
||||||
microdesc_t *md = microdesc_cache_lookup_by_digest256(cache, fp256);
|
microdesc_t *md = microdesc_cache_lookup_by_digest256(cache, fp256);
|
||||||
tor_free(fp256);
|
tor_free(fp256);
|
||||||
|
Loading…
Reference in New Issue
Block a user