From 95e3894333d0ad24d4efff2ff5857bccabc5d691 Mon Sep 17 00:00:00 2001 From: beck <> Date: Mon, 21 Apr 2014 00:52:00 +0000 Subject: fix accidentally deleted deref. --- src/lib/libcrypto/asn1/a_time.c | 2 +- src/lib/libssl/src/crypto/asn1/a_time.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') 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) /* ASN1_STRING_set() allocated 'len + 1' bytes. */ newlen = t->length + 2 + 1; str = (char *)ret->data; - i = snprintf(str, newlen, "%s%s", (t->data >= '5') ? "19" : "20", + i = snprintf(str, newlen, "%s%s", (t->data[0] >= '5') ? "19" : "20", (char *) t->data); if (i == -1 || i >= newlen) { 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) /* ASN1_STRING_set() allocated 'len + 1' bytes. */ newlen = t->length + 2 + 1; str = (char *)ret->data; - i = snprintf(str, newlen, "%s%s", (t->data >= '5') ? "19" : "20", + i = snprintf(str, newlen, "%s%s", (t->data[0] >= '5') ? "19" : "20", (char *) t->data); if (i == -1 || i >= newlen) { ASN1_STRING_free(ret); -- cgit v1.2.3-55-g6feb