From: Dr. Stephen Henson Date: Mon, 10 Aug 2009 14:57:11 +0000 (+0000) Subject: PR: 2004 X-Git-Tag: OpenSSL_1_0_0-beta4~114 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ff0945cbdca1b21d1a14e12cfb83a8851845f64e;p=oweals%2Fopenssl.git PR: 2004 Submitted by: Peter Sylvester Approved by: steve@openssl.org Handle fractional seconds properly in ASN1_GENERALIZEDTIME_print --- diff --git a/crypto/asn1/t_x509.c b/crypto/asn1/t_x509.c index e504d50d50..e061f2ffad 100644 --- a/crypto/asn1/t_x509.c +++ b/crypto/asn1/t_x509.c @@ -376,7 +376,7 @@ int ASN1_GENERALIZEDTIME_print(BIO *bp, const ASN1_GENERALIZEDTIME *tm) { s= (v[12]-'0')*10+(v[13]-'0'); /* Check for fractions of seconds. */ - if (i >= 15 && v[14] == '.') + if (tm->length >= 15 && v[14] == '.') { int l = tm->length; f = &v[14]; /* The decimal point. */