Piotr Caban : msvcrt: Improved input parameter range check in _gmtime64_s.

Alexandre Julliard julliard at winehq.org
Mon Dec 10 14:00:39 CST 2012


Module: wine
Branch: master
Commit: acac63663a2b4d910ad7d3acbb5dc161dd94c15c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=acac63663a2b4d910ad7d3acbb5dc161dd94c15c

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Mon Dec 10 12:47:40 2012 +0100

msvcrt: Improved input parameter range check in _gmtime64_s.

---

 dlls/msvcrt/time.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c
index 60c7120..05980a5 100644
--- a/dlls/msvcrt/time.c
+++ b/dlls/msvcrt/time.c
@@ -488,7 +488,7 @@ int CDECL MSVCRT__gmtime64_s(struct MSVCRT_tm *res, const MSVCRT___time64_t *sec
     SYSTEMTIME st;
     ULONGLONG time;
 
-    if (!res || !secs || *secs < 0) {
+    if (!res || !secs || *secs < 0 || *secs > _MAX__TIME64_T) {
         if (res) {
             write_invalid_msvcrt_tm(res);
         }




More information about the wine-cvs mailing list