diff options
author | djm <> | 2005-04-29 05:39:33 +0000 |
---|---|---|
committer | djm <> | 2005-04-29 05:39:33 +0000 |
commit | 68edd00d9258df93b1366c71ac124e0cadf7bc08 (patch) | |
tree | 3ce4ae2a9747bbc11aed1f95f9bbea92c41f8683 /src/lib/libcrypto/asn1/a_gentm.c | |
parent | f396ed0f5ce0af56bfde2e75e15cf1f52924c779 (diff) | |
download | openbsd-68edd00d9258df93b1366c71ac124e0cadf7bc08.tar.gz openbsd-68edd00d9258df93b1366c71ac124e0cadf7bc08.tar.bz2 openbsd-68edd00d9258df93b1366c71ac124e0cadf7bc08.zip |
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/asn1/a_gentm.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_gentm.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/a_gentm.c b/src/lib/libcrypto/asn1/a_gentm.c index 8581007868..0dfd576211 100644 --- a/src/lib/libcrypto/asn1/a_gentm.c +++ b/src/lib/libcrypto/asn1/a_gentm.c | |||
@@ -192,8 +192,9 @@ int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, char *str) | |||
192 | { | 192 | { |
193 | if (s != NULL) | 193 | if (s != NULL) |
194 | { | 194 | { |
195 | ASN1_STRING_set((ASN1_STRING *)s, | 195 | if (!ASN1_STRING_set((ASN1_STRING *)s, |
196 | (unsigned char *)str,t.length); | 196 | (unsigned char *)str,t.length)) |
197 | return 0; | ||
197 | s->type=V_ASN1_GENERALIZEDTIME; | 198 | s->type=V_ASN1_GENERALIZEDTIME; |
198 | } | 199 | } |
199 | return(1); | 200 | return(1); |
@@ -223,7 +224,12 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s, | |||
223 | if ((p == NULL) || ((size_t)s->length < len)) | 224 | if ((p == NULL) || ((size_t)s->length < len)) |
224 | { | 225 | { |
225 | p=OPENSSL_malloc(len); | 226 | p=OPENSSL_malloc(len); |
226 | if (p == NULL) return(NULL); | 227 | if (p == NULL) |
228 | { | ||
229 | ASN1err(ASN1_F_ASN1_GENERALIZEDTIME_SET, | ||
230 | ERR_R_MALLOC_FAILURE); | ||
231 | return(NULL); | ||
232 | } | ||
227 | if (s->data != NULL) | 233 | if (s->data != NULL) |
228 | OPENSSL_free(s->data); | 234 | OPENSSL_free(s->data); |
229 | s->data=(unsigned char *)p; | 235 | s->data=(unsigned char *)p; |