diff options
author | tb <> | 2023-03-15 06:22:42 +0000 |
---|---|---|
committer | tb <> | 2023-03-15 06:22:42 +0000 |
commit | 73af251f8d8df085aba437aef7f6d763c349a841 (patch) | |
tree | fdee1897f2f46ce7afff235971cd337d5d77d00b /src/lib | |
parent | f42c892d24f684ec57cafee1b0ae14ece515b4f0 (diff) | |
download | openbsd-73af251f8d8df085aba437aef7f6d763c349a841.tar.gz openbsd-73af251f8d8df085aba437aef7f6d763c349a841.tar.bz2 openbsd-73af251f8d8df085aba437aef7f6d763c349a841.zip |
Error check BIO_asn1_set_{prefix,suffix}() calls
ok jsing
Diffstat (limited to 'src/lib')
-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. |