diff options
| author | tb <> | 2023-03-15 06:22:42 +0000 |
|---|---|---|
| committer | tb <> | 2023-03-15 06:22:42 +0000 |
| commit | 2986e4f991df4a0bedeeaec8466f95a24be09909 (patch) | |
| tree | fdee1897f2f46ce7afff235971cd337d5d77d00b /src | |
| parent | 3bd54020171e9b2e7330ee5ed831533a5344cee8 (diff) | |
| download | openbsd-2986e4f991df4a0bedeeaec8466f95a24be09909.tar.gz openbsd-2986e4f991df4a0bedeeaec8466f95a24be09909.tar.bz2 openbsd-2986e4f991df4a0bedeeaec8466f95a24be09909.zip | |
Error check BIO_asn1_set_{prefix,suffix}() calls
ok jsing
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/asn1/bio_ndef.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/bio_ndef.c b/src/lib/libcrypto/asn1/bio_ndef.c index d6642e573e..7c8428f606 100644 --- a/src/lib/libcrypto/asn1/bio_ndef.c +++ b/src/lib/libcrypto/asn1/bio_ndef.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bio_ndef.c,v 1.17 2023/03/13 07:31:09 tb Exp $ */ | 1 | /* $OpenBSD: bio_ndef.c,v 1.18 2023/03/15 06:22:42 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. | 3 | * project. |
| 4 | */ | 4 | */ |
| @@ -120,8 +120,10 @@ BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it) | |||
| 120 | goto err; | 120 | goto err; |
| 121 | pop_bio = asn_bio; | 121 | pop_bio = asn_bio; |
| 122 | 122 | ||
| 123 | BIO_asn1_set_prefix(asn_bio, ndef_prefix, ndef_prefix_free); | 123 | if (BIO_asn1_set_prefix(asn_bio, ndef_prefix, ndef_prefix_free) <= 0) |
| 124 | BIO_asn1_set_suffix(asn_bio, ndef_suffix, ndef_suffix_free); | 124 | goto err; |
| 125 | if (BIO_asn1_set_suffix(asn_bio, ndef_suffix, ndef_suffix_free) <= 0) | ||
| 126 | goto err; | ||
| 125 | 127 | ||
| 126 | /* Now let callback prepend any digest, cipher etc BIOs | 128 | /* Now let callback prepend any digest, cipher etc BIOs |
| 127 | * ASN1 structure needs. | 129 | * ASN1 structure needs. |
