From 8dcfecc6c76effa8afe0d4b6eca95023d51f1e03 Mon Sep 17 00:00:00 2001 From: Gary Lin Date: Thu, 21 Jul 2016 12:28:11 +0800 Subject: Update to openssl 1.0.2h Signed-off-by: Gary Lin --- Cryptlib/OpenSSL/crypto/asn1/t_x509.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Cryptlib/OpenSSL/crypto/asn1/t_x509.c') diff --git a/Cryptlib/OpenSSL/crypto/asn1/t_x509.c b/Cryptlib/OpenSSL/crypto/asn1/t_x509.c index 8aab5513..8888396f 100644 --- a/Cryptlib/OpenSSL/crypto/asn1/t_x509.c +++ b/Cryptlib/OpenSSL/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; -- cgit v1.2.3