summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2026-09-02 07:11:04 +0000
committertb <>2026-09-02 07:11:04 +0000
commit2eeb9a47eef4d3dbeb9c97c8ef2d31fd2aa5dcf0 (patch)
tree220f4e749c5460aabb877d6f338c2cb87e41c981 /src
parent62ac7c7e0f7e0999c4900d052da38ef7438bbc38 (diff)
downloadopenbsd-2eeb9a47eef4d3dbeb9c97c8ef2d31fd2aa5dcf0.tar.gz
openbsd-2eeb9a47eef4d3dbeb9c97c8ef2d31fd2aa5dcf0.tar.bz2
openbsd-2eeb9a47eef4d3dbeb9c97c8ef2d31fd2aa5dcf0.zip
asn1_multi: assign and test twice
tweak nearby whitespace
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/asn1/asn1_gen.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/asn1_gen.c b/src/lib/libcrypto/asn1/asn1_gen.c
index 5088af86d7..28af199430 100644
--- a/src/lib/libcrypto/asn1/asn1_gen.c
+++ b/src/lib/libcrypto/asn1/asn1_gen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1_gen.c,v 1.32 2026/09/02 07:09:48 tb Exp $ */ 1/* $OpenBSD: asn1_gen.c,v 1.33 2026/09/02 07:11:04 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2002. 3 * project 2002.
4 */ 4 */
@@ -443,15 +443,17 @@ asn1_multi(int utype, const char *section, X509V3_CTX *cnf)
443 unsigned char *der = NULL; 443 unsigned char *der = NULL;
444 int derlen; 444 int derlen;
445 int i; 445 int i;
446 sk = sk_ASN1_TYPE_new_null(); 446
447 if (!sk) 447 if ((sk = sk_ASN1_TYPE_new_null()) == NULL)
448 goto err; 448 goto err;
449
449 if (section) { 450 if (section) {
450 if (!cnf) 451 if (!cnf)
451 goto err; 452 goto err;
452 sect = X509V3_get0_section(cnf, section); 453
453 if (!sect) 454 if ((sect = X509V3_get0_section(cnf, section)) == NULL)
454 goto err; 455 goto err;
456
455 for (i = 0; i < sk_CONF_VALUE_num(sect); i++) { 457 for (i = 0; i < sk_CONF_VALUE_num(sect); i++) {
456 CONF_VALUE *val = sk_CONF_VALUE_value(sect, i); 458 CONF_VALUE *val = sk_CONF_VALUE_value(sect, i);
457 459