summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorKinichiro Inoguchi <inoguchi@cvs.openbsd.org>2022-01-20 11:06:25 +0000
committerKinichiro Inoguchi <inoguchi@cvs.openbsd.org>2022-01-20 11:06:25 +0000
commitcbb735574d7946893169dfa3a86aa2e6d4792411 (patch)
tree429217a1cf622eee7caab3b6cd99aaf2e563ac9c /lib/libcrypto
parentf60a3e3b7ca8f14127981b8e6e6d70fcacadc905 (diff)
Add check for BIO_indent return value
CID 24778 ok jsing@ millert@ tb@
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/evp/p_lib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libcrypto/evp/p_lib.c b/lib/libcrypto/evp/p_lib.c
index 89ce4c451a2..cdd38e4e30d 100644
--- a/lib/libcrypto/evp/p_lib.c
+++ b/lib/libcrypto/evp/p_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: p_lib.c,v 1.27 2021/12/12 21:30:13 tb Exp $ */
+/* $OpenBSD: p_lib.c,v 1.28 2022/01/20 11:06:24 inoguchi Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -526,7 +526,8 @@ EVP_PKEY_free_it(EVP_PKEY *x)
static int
unsup_alg(BIO *out, const EVP_PKEY *pkey, int indent, const char *kstr)
{
- BIO_indent(out, indent, 128);
+ if (!BIO_indent(out, indent, 128))
+ return 0;
BIO_printf(out, "%s algorithm \"%s\" unsupported\n",
kstr, OBJ_nid2ln(pkey->type));
return 1;