summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/asn1/a_time.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_time.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/a_time.c b/src/lib/libcrypto/asn1/a_time.c
index 080c3dfddb..8db2163622 100644
--- a/src/lib/libcrypto/asn1/a_time.c
+++ b/src/lib/libcrypto/asn1/a_time.c
@@ -152,7 +152,7 @@ ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out)
152 /* ASN1_STRING_set() allocated 'len + 1' bytes. */ 152 /* ASN1_STRING_set() allocated 'len + 1' bytes. */
153 newlen = t->length + 2 + 1; 153 newlen = t->length + 2 + 1;
154 str = (char *)ret->data; 154 str = (char *)ret->data;
155 i = snprintf(str, newlen, "%s%s", (t->data >= '5') ? "19" : "20", 155 i = snprintf(str, newlen, "%s%s", (t->data[0] >= '5') ? "19" : "20",
156 (char *) t->data); 156 (char *) t->data);
157 if (i == -1 || i >= newlen) { 157 if (i == -1 || i >= newlen) {
158 ASN1_STRING_free(ret); 158 ASN1_STRING_free(ret);
diff --git a/src/lib/libssl/src/crypto/asn1/a_time.c b/src/lib/libssl/src/crypto/asn1/a_time.c
index 080c3dfddb..8db2163622 100644
--- a/src/lib/libssl/src/crypto/asn1/a_time.c
+++ b/src/lib/libssl/src/crypto/asn1/a_time.c
@@ -152,7 +152,7 @@ ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out)
152 /* ASN1_STRING_set() allocated 'len + 1' bytes. */ 152 /* ASN1_STRING_set() allocated 'len + 1' bytes. */
153 newlen = t->length + 2 + 1; 153 newlen = t->length + 2 + 1;
154 str = (char *)ret->data; 154 str = (char *)ret->data;
155 i = snprintf(str, newlen, "%s%s", (t->data >= '5') ? "19" : "20", 155 i = snprintf(str, newlen, "%s%s", (t->data[0] >= '5') ? "19" : "20",
156 (char *) t->data); 156 (char *) t->data);
157 if (i == -1 || i >= newlen) { 157 if (i == -1 || i >= newlen) {
158 ASN1_STRING_free(ret); 158 ASN1_STRING_free(ret);