ucrtbase: Add parameters validation to _timespec32_get function.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2020-07-14 20:22:40 +02:00 committed by Alexandre Julliard
parent e9b3660e72
commit 2a12ccd8e8
1 changed files with 3 additions and 0 deletions

View File

@ -1998,6 +1998,9 @@ int CDECL _timespec32_get(struct _timespec32 *ts, int base)
{
struct _timespec64 ts64;
if(!MSVCRT_CHECK_PMT(ts != NULL)) return 0;
if(base != TIME_UTC) return 0;
if(_timespec64_get(&ts64, base) != base)
return 0;
if(ts64.tv_sec != (MSVCRT___time32_t)ts64.tv_sec)