diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2005-04-29 05:39:34 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2005-04-29 05:39:34 +0000 |
commit | 96d1d9b6e08bc96e9e2ca66809e78057a7ad7715 (patch) | |
tree | 3c21c706afbaf02026085e88634587633cdae96a /lib/libcrypto/asn1/a_utctm.c | |
parent | ccd50423df222a7b368ec130192398b49e23114a (diff) |
resolve conflicts
Diffstat (limited to 'lib/libcrypto/asn1/a_utctm.c')
-rw-r--r-- | lib/libcrypto/asn1/a_utctm.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/libcrypto/asn1/a_utctm.c b/lib/libcrypto/asn1/a_utctm.c index 999852dae52..7b25fed331c 100644 --- a/lib/libcrypto/asn1/a_utctm.c +++ b/lib/libcrypto/asn1/a_utctm.c @@ -173,8 +173,9 @@ int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, char *str) { if (s != NULL) { - ASN1_STRING_set((ASN1_STRING *)s, - (unsigned char *)str,t.length); + if (!ASN1_STRING_set((ASN1_STRING *)s, + (unsigned char *)str,t.length)) + return 0; s->type = V_ASN1_UTCTIME; } return(1); @@ -203,7 +204,11 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) if ((p == NULL) || ((size_t)s->length < len)) { p=OPENSSL_malloc(len); - if (p == NULL) return(NULL); + if (p == NULL) + { + ASN1err(ASN1_F_ASN1_UTCTIME_SET,ERR_R_MALLOC_FAILURE); + return(NULL); + } if (s->data != NULL) OPENSSL_free(s->data); s->data=(unsigned char *)p; |