mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:56:05 +00:00
[CRT] fix null pointer deref in _gmtime64_s CID 515314
svn path=/trunk/; revision=68913
This commit is contained in:
parent
cba771af31
commit
3c5b952cb3
1 changed files with 4 additions and 1 deletions
|
@ -123,7 +123,8 @@ _gmtime64_s(
|
||||||
struct tm* ptm,
|
struct tm* ptm,
|
||||||
const __time64_t* ptime)
|
const __time64_t* ptime)
|
||||||
{
|
{
|
||||||
__time64_t time = *ptime;
|
__time64_t time;
|
||||||
|
|
||||||
if (!ptm)
|
if (!ptm)
|
||||||
{
|
{
|
||||||
MSVCRT_INVALID_PMT("ptm == NULL", ERROR_BAD_COMMAND);
|
MSVCRT_INVALID_PMT("ptm == NULL", ERROR_BAD_COMMAND);
|
||||||
|
@ -136,6 +137,8 @@ _gmtime64_s(
|
||||||
return ERROR_BAD_COMMAND;
|
return ERROR_BAD_COMMAND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time = *ptime;
|
||||||
|
|
||||||
_gmtime_worker(ptm, time, 0);
|
_gmtime_worker(ptm, time, 0);
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue