mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
Return an error if gmtime returns NULL.
This commit is contained in:
parent
767712fa62
commit
52c4c51f02
@ -80,8 +80,10 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result)
|
|||||||
ts = result;
|
ts = result;
|
||||||
#elif !defined(OPENSSL_SYS_VMS)
|
#elif !defined(OPENSSL_SYS_VMS)
|
||||||
ts = gmtime(timer);
|
ts = gmtime(timer);
|
||||||
if (ts != NULL)
|
if (ts == NULL)
|
||||||
memcpy(result, ts, sizeof(struct tm));
|
return NULL;
|
||||||
|
|
||||||
|
memcpy(result, ts, sizeof(struct tm));
|
||||||
ts = result;
|
ts = result;
|
||||||
#endif
|
#endif
|
||||||
#ifdef OPENSSL_SYS_VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
|
Loading…
Reference in New Issue
Block a user