diff options
author | beck <> | 2014-04-21 00:52:00 +0000 |
---|---|---|
committer | beck <> | 2014-04-21 00:52:00 +0000 |
commit | 95e3894333d0ad24d4efff2ff5857bccabc5d691 (patch) | |
tree | cd22db0cbc1dc9f223275e2f4f2e4eab16a87cf2 | |
parent | 72fecb100e62bfefd9ab2896db696ee6dee6d889 (diff) | |
download | openbsd-95e3894333d0ad24d4efff2ff5857bccabc5d691.tar.gz openbsd-95e3894333d0ad24d4efff2ff5857bccabc5d691.tar.bz2 openbsd-95e3894333d0ad24d4efff2ff5857bccabc5d691.zip |
fix accidentally deleted deref.
-rw-r--r-- | src/lib/libcrypto/asn1/a_time.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/asn1/a_time.c | 2 |
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); |