Author: cwittich
Date: Wed Sep 2 10:20:21 2015
New Revision: 68913
URL:
http://svn.reactos.org/svn/reactos?rev=68913&view=rev
Log:
[CRT] fix null pointer deref in _gmtime64_s CID 515314
Modified:
trunk/reactos/lib/sdk/crt/time/gmtime.c
Modified: trunk/reactos/lib/sdk/crt/time/gmtime.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/time/gmtime.c?…
==============================================================================
--- trunk/reactos/lib/sdk/crt/time/gmtime.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/time/gmtime.c [iso-8859-1] Wed Sep 2 10:20:21 2015
@@ -123,7 +123,8 @@
struct tm* ptm,
const __time64_t* ptime)
{
- __time64_t time = *ptime;
+ __time64_t time;
+
if (!ptm)
{
MSVCRT_INVALID_PMT("ptm == NULL", ERROR_BAD_COMMAND);
@@ -135,6 +136,8 @@
MSVCRT_INVALID_PMT("ptime == NULL", ERROR_BAD_COMMAND);
return ERROR_BAD_COMMAND;
}
+
+ time = *ptime;
_gmtime_worker(ptm, time, 0);