summaryrefslogtreecommitdiffstats
path: root/crypto/asn1
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2008-11-05 18:29:49 +0000
committerDr. Stephen Henson <steve@openssl.org>2008-11-05 18:29:49 +0000
commit33fd33d423155c9268362132c2f8281e0eb6dbf9 (patch)
tree81eca02b89f0c407a7c4fa3331ac5344f981e7a5 /crypto/asn1
parent4e98f8863f3468cff55c612fdc58172974094f47 (diff)
Fix from HEAD.
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/t_x509.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/t_x509.c b/crypto/asn1/t_x509.c
index ae72b525d7..8b09e5890f 100644
--- a/crypto/asn1/t_x509.c
+++ b/crypto/asn1/t_x509.c
@@ -393,7 +393,7 @@ int ASN1_GENERALIZEDTIME_print(BIO *bp, ASN1_GENERALIZEDTIME *tm)
d= (v[6]-'0')*10+(v[7]-'0');
h= (v[8]-'0')*10+(v[9]-'0');
m= (v[10]-'0')*10+(v[11]-'0');
- if (i >= 14 &&
+ if (tm->length >= 14 &&
(v[12] >= '0') && (v[12] <= '9') &&
(v[13] >= '0') && (v[13] <= '9'))
s= (v[12]-'0')*10+(v[13]-'0');
@@ -429,7 +429,7 @@ int ASN1_UTCTIME_print(BIO *bp, ASN1_UTCTIME *tm)
d= (v[4]-'0')*10+(v[5]-'0');
h= (v[6]-'0')*10+(v[7]-'0');
m= (v[8]-'0')*10+(v[9]-'0');
- if (i >=12 &&
+ if (tm->length >=12 &&
(v[10] >= '0') && (v[10] <= '9') &&
(v[11] >= '0') && (v[11] <= '9'))
s= (v[10]-'0')*10+(v[11]-'0');