From: tb Date: Fri, 3 Jun 2022 13:23:16 +0000 (+0000) Subject: Check tls_config_new() for NULL return X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e87883d971519e44cccf1da2517ba3220d841834;p=openbsd Check tls_config_new() for NULL return This way we don't crash in tls_config_insecure_noverify_cert(). From Mateusz Piotrowski on bugs ok claudio --- diff --git a/usr.sbin/relayd/hce.c b/usr.sbin/relayd/hce.c index f1a5082504b..75b6f3c838b 100644 --- a/usr.sbin/relayd/hce.c +++ b/usr.sbin/relayd/hce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hce.c,v 1.80 2021/02/22 01:24:59 jmatthew Exp $ */ +/* $OpenBSD: hce.c,v 1.81 2022/06/03 13:23:16 tb Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard @@ -92,6 +92,8 @@ hce_setup_events(void) table->tls_cfg != NULL) continue; table->tls_cfg = tls_config_new(); + if (table->tls_cfg == NULL) + fatalx("%s: tls_config_new", __func__); tls_config_insecure_noverifycert(table->tls_cfg); tls_config_insecure_noverifyname(table->tls_cfg); }