Piotr Caban : ucrtbase: Add parameters validation to _timespec32_get function.

Alexandre Julliard julliard at winehq.org
Tue Jul 14 16:23:38 CDT 2020


Module: wine
Branch: master
Commit: 2a12ccd8e8a0e72d544205e22c91e749ddb74129
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2a12ccd8e8a0e72d544205e22c91e749ddb74129

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Tue Jul 14 20:22:40 2020 +0200

ucrtbase: Add parameters validation to _timespec32_get function.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/time.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c
index 7f565e350d..f7bb452a43 100644
--- a/dlls/msvcrt/time.c
+++ b/dlls/msvcrt/time.c
@@ -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)




More information about the wine-cvs mailing list