From: Olivier Houchard Date: Thu, 6 Jun 2019 11:21:23 +0000 (+0200) Subject: BUG/MEDIUM: ssl: Don't forget to initialize ctx->send_recv and ctx->recv_wait. X-Git-Tag: v2.0-dev6~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=81284e690837d8588a3c388a60fb72fa4c5c94a0;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: ssl: Don't forget to initialize ctx->send_recv and ctx->recv_wait. When creating a new ssl_sock_ctx, don't forget to initialize its send_recv and recv_wait to NULL, or we may end up dereferencing random values, and crash. --- diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 6829823b45..5cc005b7c7 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -5122,6 +5122,8 @@ static int ssl_sock_init(struct connection *conn, void **xprt_ctx) ctx->sent_early_data = 0; ctx->tmp_early_data = -1; ctx->conn = conn; + ctx->send_wait = NULL; + ctx->recv_wait = NULL; /* Only work with sockets for now, this should be adapted when we'll * add QUIC support.