summaryrefslogtreecommitdiff
path: root/crypto/evp/p_lib.c
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-01-06 11:23:21 +1000
committerPauli <paul.dale@oracle.com>2020-01-07 14:02:52 +1000
commit5310a4e616f9f0268048c6a8c4dec4cf2c493bb8 (patch)
tree7ebd3cc1c79a56292b8c7c1db1b4a1b593ff8ec5 /crypto/evp/p_lib.c
parent756f5c6c7cc97b4cc3b9872e06967c667448511d (diff)
downloadopenssl-new-5310a4e616f9f0268048c6a8c4dec4cf2c493bb8.tar.gz
coverity 1201462: check error returns
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10760)
Diffstat (limited to 'crypto/evp/p_lib.c')
-rw-r--r--crypto/evp/p_lib.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c
index 9999636cfd..59cadb4aad 100644
--- a/crypto/evp/p_lib.c
+++ b/crypto/evp/p_lib.c
@@ -694,10 +694,9 @@ static int print_set_indent(BIO **out, int *pop_f_prefix, long *saved_indent,
static int unsup_alg(BIO *out, const EVP_PKEY *pkey, int indent,
const char *kstr)
{
- BIO_indent(out, indent, 128);
- BIO_printf(out, "%s algorithm \"%s\" unsupported\n",
- kstr, OBJ_nid2ln(pkey->type));
- return 1;
+ return BIO_indent(out, indent, 128)
+ && BIO_printf(out, "%s algorithm \"%s\" unsupported\n",
+ kstr, OBJ_nid2ln(pkey->type)) > 0;
}
static int print_pkey(const EVP_PKEY *pkey, BIO *out, int indent,