diff options
-rw-r--r-- | src/lib/libcrypto/x509/x509_addr.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509/x509_addr.c b/src/lib/libcrypto/x509/x509_addr.c index 227d934806..684a115401 100644 --- a/src/lib/libcrypto/x509/x509_addr.c +++ b/src/lib/libcrypto/x509/x509_addr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_addr.c,v 1.49 2022/01/04 19:56:53 tb Exp $ */ | 1 | /* $OpenBSD: x509_addr.c,v 1.50 2022/01/04 20:02:22 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Contributed to the OpenSSL Project by the American Registry for | 3 | * Contributed to the OpenSSL Project by the American Registry for |
4 | * Internet Numbers ("ARIN"). | 4 | * Internet Numbers ("ARIN"). |
@@ -810,8 +810,7 @@ make_addressPrefix(IPAddressOrRange **result, unsigned char *addr, | |||
810 | if (aor == NULL) | 810 | if (aor == NULL) |
811 | return 0; | 811 | return 0; |
812 | aor->type = IPAddressOrRange_addressPrefix; | 812 | aor->type = IPAddressOrRange_addressPrefix; |
813 | if (aor->u.addressPrefix == NULL && | 813 | if ((aor->u.addressPrefix = ASN1_BIT_STRING_new()) == NULL) |
814 | (aor->u.addressPrefix = ASN1_BIT_STRING_new()) == NULL) | ||
815 | goto err; | 814 | goto err; |
816 | if (!ASN1_BIT_STRING_set(aor->u.addressPrefix, addr, bytelen)) | 815 | if (!ASN1_BIT_STRING_set(aor->u.addressPrefix, addr, bytelen)) |
817 | goto err; | 816 | goto err; |