From 3b59bd4a50a6c24f8ea5bd7225c3a5348c349dfc Mon Sep 17 00:00:00 2001 From: mbuhl Date: Thu, 10 Nov 2022 00:44:12 +0000 Subject: [PATCH] In case RSA_meth_new fails, errstr would be passed to fatalx without initialization. OK tb --- usr.sbin/relayd/ca.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/relayd/ca.c b/usr.sbin/relayd/ca.c index 5a4e109499c..9f186e28df3 100644 --- a/usr.sbin/relayd/ca.c +++ b/usr.sbin/relayd/ca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ca.c,v 1.39 2022/01/20 17:56:35 benno Exp $ */ +/* $OpenBSD: ca.c,v 1.40 2022/11/10 00:44:12 mbuhl Exp $ */ /* * Copyright (c) 2014 Reyk Floeter @@ -513,8 +513,10 @@ ca_engine_init(struct relayd *x_env) if (rsa_default != NULL) return; - if ((rsae_method = RSA_meth_new("RSA privsep engine", 0)) == NULL) + if ((rsae_method = RSA_meth_new("RSA privsep engine", 0)) == NULL) { + errstr = "RSA_meth_new"; goto fail; + } RSA_meth_set_pub_enc(rsae_method, rsae_pub_enc); RSA_meth_set_pub_dec(rsae_method, rsae_pub_dec); -- 2.20.1