summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-06-03 13:23:17 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-06-03 13:23:17 +0000
commitca0be9d941fea2a08f1a2553b2c6c4d360d159d4 (patch)
tree669a9edc63df543bab645ef78c8f90ee7332ae9d /usr.sbin/relayd
parentced575ab4b86b4f30e0738a58d08b2f4ecc07c42 (diff)
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
Diffstat (limited to 'usr.sbin/relayd')
-rw-r--r--usr.sbin/relayd/hce.c4
1 files changed, 3 insertions, 1 deletions
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 <pyr@openbsd.org>
@@ -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);
}