summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-03-28 00:44:27 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-03-28 00:44:27 +0000
commit48ab0701a65eb5f39892983bf0c5a4c82ddb0175 (patch)
tree0a59f9a4d312d9bf2cf3c43f05c79e7da7cc6a51 /lib/libcrypto
parentd27ce8ce2f9529b5653c7725d573fe9901f76608 (diff)
PKCS#1.5 PBE: test and assign
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/asn1/p5_pbe.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libcrypto/asn1/p5_pbe.c b/lib/libcrypto/asn1/p5_pbe.c
index 0b628b36d92..94daf3bedfd 100644
--- a/lib/libcrypto/asn1/p5_pbe.c
+++ b/lib/libcrypto/asn1/p5_pbe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: p5_pbe.c,v 1.26 2024/03/02 10:17:37 tb Exp $ */
+/* $OpenBSD: p5_pbe.c,v 1.27 2024/03/28 00:44:26 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
@@ -127,8 +127,7 @@ PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
ASN1_STRING *pbe_str = NULL;
unsigned char *sstr;
- pbe = PBEPARAM_new();
- if (!pbe) {
+ if ((pbe = PBEPARAM_new()) == NULL) {
ASN1error(ERR_R_MALLOC_FAILURE);
goto err;
}