Handle inbound EOF before outbound CONNECTED

Fix segmentation fault upon receiving BEV_EVENT_EOF on the inbound
bufferevent while the outbound bufferevent has not received
BEV_EVENT_CONNECTED yet.

Issue:		#124
Patch by:	Eun Soo Park
pull/13/head
Daniel Roethlisberger 8 years ago
parent 1bd963caf2
commit 2f834419eb

@ -1,6 +1,9 @@
### SSLsplit develop
- Fix a rare segmentation fault upon receiving EOF on the inbound connection
while the outbound connection has not been established yet (patch by
@eunsoopark, issue #124).
- Enable full-strength DHE and ECDHE by default, even for non-RSA leaf keys,
in order to avoid weak cipher warnings from browsers (issue #119).
- Fix SSL sessions to actually time out (patch by @eunsoopark, issue #115).

@ -1973,7 +1973,12 @@ connected:
}
if (events & BEV_EVENT_EOF) {
if (!other->closed) {
if (!ctx->connected) {
log_dbg_printf("EOF on inbound connection while "
"connecting to original destination\n");
evutil_closesocket(ctx->fd);
other->closed = 1;
} else if (!other->closed) {
struct evbuffer *inbuf, *outbuf;
inbuf = bufferevent_get_input(bev);
outbuf = bufferevent_get_output(other->bev);

Loading…
Cancel
Save