From: Amaury Denoyelle Date: Thu, 23 Dec 2021 15:32:24 +0000 (+0100) Subject: BUG/MINOR: quic: fix potential use of uninit pointer X-Git-Tag: v2.6-dev1~221 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9979d0d1eafd2d0af9aeb347503da5da7eb3a11c;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: fix potential use of uninit pointer Properly initialized the ssl_sock_ctx pointer in qc_conn_init. This is required to avoid to set an undefined pointer in qc.xprt_ctx if argument *xprt_ctx is NULL. --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index f486ebad83..f2d549e343 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -5026,7 +5026,7 @@ static int qc_ssl_sess_init(struct quic_conn *qc, SSL_CTX *ssl_ctx, SSL **ssl, */ static int qc_conn_init(struct connection *conn, void **xprt_ctx) { - struct ssl_sock_ctx *ctx; + struct ssl_sock_ctx *ctx = NULL; struct quic_conn *qc = NULL; TRACE_ENTER(QUIC_EV_CONN_NEW, conn);