summaryrefslogtreecommitdiffstats
path: root/crypto/o_time.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2003-01-24 02:12:01 +0100
committerDr. Stephen Henson <steve@openssl.org>2003-01-24 02:12:01 +0100
commitd3b5cb5343afa4e4ae64bee4621171e6b00aaa21 (patch)
tree308f89977f30d1eddebf02c5c596c515db47e0ef /crypto/o_time.c
parentWorkaround for lame compiler bug introduced in "CPU pack" for MSVC6SP5. (diff)
downloadopenssl-d3b5cb5343afa4e4ae64bee4621171e6b00aaa21.tar.xz
openssl-d3b5cb5343afa4e4ae64bee4621171e6b00aaa21.zip
Check return value of gmtime() and add error codes
where it fails in ASN1_TIME_set(). Edit asn1.h so the new error code is the same in 0.9.7 and 0.9.8, rebuild new error codes. Clear error queue in req.c if *_min or *_max is absent.
Diffstat (limited to 'crypto/o_time.c')
-rw-r--r--crypto/o_time.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/o_time.c b/crypto/o_time.c
index 1bc0297b36..ca5f3ea48e 100644
--- a/crypto/o_time.c
+++ b/crypto/o_time.c
@@ -80,7 +80,8 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result)
ts = result;
#elif !defined(OPENSSL_SYS_VMS)
ts = gmtime(timer);
- memcpy(result, ts, sizeof(struct tm));
+ if (ts != NULL)
+ memcpy(result, ts, sizeof(struct tm));
ts = result;
#endif
#ifdef OPENSSL_SYS_VMS