[CRT] fix null pointer deref in _gmtime64_s CID 515314

svn path=/trunk/; revision=68913
This commit is contained in:
Christoph von Wittich 2015-09-02 10:20:21 +00:00
parent cba771af31
commit 3c5b952cb3

View file

@ -123,7 +123,8 @@ _gmtime64_s(
struct tm* ptm,
const __time64_t* ptime)
{
__time64_t time = *ptime;
__time64_t time;
if (!ptm)
{
MSVCRT_INVALID_PMT("ptm == NULL", ERROR_BAD_COMMAND);
@ -136,6 +137,8 @@ _gmtime64_s(
return ERROR_BAD_COMMAND;
}
time = *ptime;
_gmtime_worker(ptm, time, 0);
return ERROR_SUCCESS;