提交 52c4c51f 编写于 作者: D Dr. Stephen Henson

Return an error if gmtime returns NULL.

上级 767712fa
...@@ -80,8 +80,10 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) ...@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册