From 9979d0d1eafd2d0af9aeb347503da5da7eb3a11c Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 23 Dec 2021 16:32:24 +0100 Subject: [PATCH] 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. --- src/xprt_quic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xprt_quic.c b/src/xprt_quic.c index f486ebad8..f2d549e34 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);