Skip to content
Snippets Groups Projects
Commit b7ae108e authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Always defer bufferevent_openssl callbacks to avoid reentrant invocations

parent 89e8f31c
No related branches found
No related tags found
No related merge requests found
......@@ -1710,12 +1710,16 @@ tor_tls_init_bufferevent(tor_tls_t *tls, struct bufferevent *bufev_in,
bufferevent_free(bufev_in);
}
tls->state = TOR_TLS_ST_BUFFEREVENT;
/* Current versions (as of 2.0.7-rc) of Libevent need to defer
* bufferevent_openssl callbacks, or else our callback functions will
* get called reentrantly, which is bad for us.
*/
out = bufferevent_openssl_socket_new(tor_libevent_get_base(),
socket,
tls->ssl,
state,
0);
//BEV_OPT_DEFER_CALLBACKS);
BEV_OPT_DEFER_CALLBACKS);
#endif
return out;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment