diff options
| author | Matthew Garrett <mjg@redhat.com> | 2012-07-02 12:33:42 -0400 |
|---|---|---|
| committer | Matthew Garrett <mjg@redhat.com> | 2012-07-02 12:33:42 -0400 |
| commit | d259b1406044b430fe5786cd57e272bb9c57166d (patch) | |
| tree | 308e31c8b7338e11843ac324ce20b89d765c3f45 /Cryptlib/OpenSSL/crypto/asn1/asn1_gen.c | |
| parent | 20094cb55d476c5d053cc73cec6e0d3f2a1c8d9a (diff) | |
| download | efi-boot-shim-d259b1406044b430fe5786cd57e272bb9c57166d.tar.gz efi-boot-shim-d259b1406044b430fe5786cd57e272bb9c57166d.zip | |
Update OpenSSL
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/asn1/asn1_gen.c')
| -rwxr-xr-x | Cryptlib/OpenSSL/crypto/asn1/asn1_gen.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Cryptlib/OpenSSL/crypto/asn1/asn1_gen.c b/Cryptlib/OpenSSL/crypto/asn1/asn1_gen.c index 2da38292..213a8e98 100755 --- a/Cryptlib/OpenSSL/crypto/asn1/asn1_gen.c +++ b/Cryptlib/OpenSSL/crypto/asn1/asn1_gen.c @@ -227,6 +227,8 @@ ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf) /* Allocate buffer for new encoding */ new_der = OPENSSL_malloc(len); + if (!new_der) + goto err; /* Generate tagged encoding */ @@ -446,6 +448,8 @@ static ASN1_TYPE *asn1_multi(int utype, const char *section, X509V3_CTX *cnf) int derlen; int i, is_set; sk = sk_ASN1_TYPE_new_null(); + if (!sk) + goto bad; if (section) { if (!cnf) @@ -458,7 +462,8 @@ static ASN1_TYPE *asn1_multi(int utype, const char *section, X509V3_CTX *cnf) typ = ASN1_generate_v3(sk_CONF_VALUE_value(sect, i)->value, cnf); if (!typ) goto bad; - sk_ASN1_TYPE_push(sk, typ); + if (!sk_ASN1_TYPE_push(sk, typ)) + goto bad; typ = NULL; } } @@ -474,6 +479,8 @@ static ASN1_TYPE *asn1_multi(int utype, const char *section, X509V3_CTX *cnf) derlen = i2d_ASN1_SET_OF_ASN1_TYPE(sk, NULL, i2d_ASN1_TYPE, utype, V_ASN1_UNIVERSAL, is_set); der = OPENSSL_malloc(derlen); + if (!der) + goto bad; p = der; i2d_ASN1_SET_OF_ASN1_TYPE(sk, &p, i2d_ASN1_TYPE, utype, V_ASN1_UNIVERSAL, is_set); |
