From d7fa1e38a0fb526434ca625f7dda53c942f6f77c Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 28 Mar 2024 00:44:26 +0000 Subject: [PATCH] PKCS#1.5 PBE: test and assign --- lib/libcrypto/asn1/p5_pbe.c | 5 ++--- 1 file 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; } -- 2.20.1