diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-05-04 08:35:35 +0200 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2016-05-04 08:35:35 +0200 |
commit | 3279ad79c3dcecbb2c5c001775d7a28f982e0955 (patch) | |
tree | 2511b58f7b1b50fc0b9b84efa1c29fe25bd7876b /drivers/builtin_openssl2/crypto/asn1/t_x509.c | |
parent | 6a4b62e72069f7c96f8b7cb9b7855da0bbd84b63 (diff) | |
parent | ab623c923d4e2c950342aec5da371cb92b1fbbc6 (diff) |
Merge pull request #4540 from mrezai/openssl-1.0.2h
Update OpenSSL to 1.0.2h
Diffstat (limited to 'drivers/builtin_openssl2/crypto/asn1/t_x509.c')
-rw-r--r-- | drivers/builtin_openssl2/crypto/asn1/t_x509.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/builtin_openssl2/crypto/asn1/t_x509.c b/drivers/builtin_openssl2/crypto/asn1/t_x509.c index 8aab55130c..8888396f84 100644 --- a/drivers/builtin_openssl2/crypto/asn1/t_x509.c +++ b/drivers/builtin_openssl2/crypto/asn1/t_x509.c @@ -140,7 +140,8 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, goto err; bs = X509_get_serialNumber(x); - if (bs->length <= (int)sizeof(long)) { + if (bs->length < (int)sizeof(long) + || (bs->length == sizeof(long) && (bs->data[0] & 0x80) == 0)) { l = ASN1_INTEGER_get(bs); if (bs->type == V_ASN1_NEG_INTEGER) { l = -l; |