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)
This commit is contained in:
Neil Horman
2025-04-17 11:51:07 -04:00
parent 1bf5280b69
commit 3702f51c29

View File

@@ -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;