Commit 3702f51c29 for openssl.org
commit 3702f51c29f25aee25951b4d48fd4093f475e107
Author: Neil Horman <nhorman@openssl.org>
Date: Thu Apr 17 11:51:07 2025 -0400
Fix segfault on qlog creation with no tls
Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27397)
diff --git a/ssl/quic/quic_port.c b/ssl/quic/quic_port.c
index 6f2be90572..326a0ab098 100644
--- a/ssl/quic/quic_port.c
+++ b/ssl/quic/quic_port.c
@@ -554,7 +554,7 @@ static QUIC_CHANNEL *port_make_channel(QUIC_PORT *port, SSL *tls, OSSL_QRX *qrx,
* If we're using qlog, make sure the tls get further configured properly
*/
ch->use_qlog = 1;
- if (ch->tls->ctx->qlog_title != NULL) {
+ if (ch->tls && ch->tls->ctx->qlog_title != NULL) {
if ((ch->qlog_title = OPENSSL_strdup(ch->tls->ctx->qlog_title)) == NULL) {
OPENSSL_free(ch);
return NULL;