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.kaiwu.me/postgresql/log/contrib/postgres_fdw/NGINX-js-1660x332.png%20%22NGINX%20JavaScript%20Banner%22?a=commitdiff_plain;h=9979d0d1eafd2d0af9aeb347503da5da7eb3a11c;p=haproxy.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 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);