From d3b5cb5343afa4e4ae64bee4621171e6b00aaa21 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 24 Jan 2003 01:12:01 +0000 Subject: 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. --- crypto/o_time.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crypto/o_time.c') 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 -- cgit v1.2.3