From 8dfa678933bc42faeff1d9406e589c16fac7f60e Mon Sep 17 00:00:00 2001 From: tb <> Date: Thu, 16 Apr 2026 07:33:11 +0000 Subject: libtls: use TLS_ERROR_OUT_OF_MEMORY after malloc failure tls_config_load_file() hat a spot that used TLS_ERROR_UNKNOWN, so switch that to the usual error code. Use tls_error_setx() since strerror(ENOMEM) adds nothing. From Michael Forney ok bcook --- src/lib/libtls/tls_config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/libtls/tls_config.c b/src/lib/libtls/tls_config.c index 848117a91a..d35c5065c5 100644 --- a/src/lib/libtls/tls_config.c +++ b/src/lib/libtls/tls_config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_config.c,v 1.72 2026/03/10 05:26:04 deraadt Exp $ */ +/* $OpenBSD: tls_config.c,v 1.73 2026/04/16 07:33:11 tb Exp $ */ /* * Copyright (c) 2014 Joel Sing * @@ -65,7 +65,7 @@ tls_config_load_file(struct tls_error *error, const char *filetype, goto err; *len = (size_t)st.st_size; if ((*buf = malloc(*len)) == NULL) { - tls_error_set(error, TLS_ERROR_UNKNOWN, + tls_error_setx(error, TLS_ERROR_OUT_OF_MEMORY, "failed to allocate buffer for %s file", filetype); goto err; -- cgit v1.2.3-55-g6feb