diff options
| author | Gary Lin <glin@suse.com> | 2016-07-21 12:28:11 +0800 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2016-09-06 15:05:36 -0400 |
| commit | 8dcfecc6c76effa8afe0d4b6eca95023d51f1e03 (patch) | |
| tree | 42c00f22bb1e6c668703bd83939f30dda01ad7e6 /Cryptlib/OpenSSL/crypto/asn1/x_x509.c | |
| parent | d8b0e8e0ce347d9f5830cfeb3fd09a887a903d09 (diff) | |
| download | efi-boot-shim-8dcfecc6c76effa8afe0d4b6eca95023d51f1e03.tar.gz efi-boot-shim-8dcfecc6c76effa8afe0d4b6eca95023d51f1e03.zip | |
Update to openssl 1.0.2h
Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/asn1/x_x509.c')
| -rw-r--r-- | Cryptlib/OpenSSL/crypto/asn1/x_x509.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Cryptlib/OpenSSL/crypto/asn1/x_x509.c b/Cryptlib/OpenSSL/crypto/asn1/x_x509.c index e2cac836..e31e1e75 100644 --- a/Cryptlib/OpenSSL/crypto/asn1/x_x509.c +++ b/Cryptlib/OpenSSL/crypto/asn1/x_x509.c @@ -201,10 +201,20 @@ X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length) int i2d_X509_AUX(X509 *a, unsigned char **pp) { - int length; + int length, tmplen; + unsigned char *start = pp != NULL ? *pp : NULL; length = i2d_X509(a, pp); - if (a) - length += i2d_X509_CERT_AUX(a->aux, pp); + if (length < 0 || a == NULL) + return length; + + tmplen = i2d_X509_CERT_AUX(a->aux, pp); + if (tmplen < 0) { + if (start != NULL) + *pp = start; + return tmplen; + } + length += tmplen; + return length; } |
