diff options
Diffstat (limited to 'crypto/o_time.c')
-rw-r--r-- | crypto/o_time.c | 3 |
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 |