From: Pauli Date: Mon, 6 Jan 2020 01:23:21 +0000 (+1000) Subject: coverity 1201462: check error returns X-Git-Tag: openssl-3.0.0-alpha1~732 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5310a4e616f9f0268048c6a8c4dec4cf2c493bb8;p=oweals%2Fopenssl.git coverity 1201462: check error returns Reviewed-by: Tim Hudson (Merged from https://github.com/openssl/openssl/pull/10760) --- 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,