diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-07-03 09:59:17 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-07-03 09:59:17 +0200 |
commit | 44c8b7414ce96038017edc2fd827f8250669a62a (patch) | |
tree | ec317c10a02bd2a1b66505550170bfc6ac6db2f7 /TSRM | |
parent | 32c68428a9888e3776441ed39c85b8b49f08fb88 (diff) | |
download | php-git-44c8b7414ce96038017edc2fd827f8250669a62a.tar.gz |
Fix #78241: touch() does not handle dates after 2038 in PHP 64-bit
`time_t` defaults to `_time64` (which is 64bit signed) even on x86, but
`Int32x32To64()` truncates it to signed 32bit. We replace the macro
with the "manual" calculation.
Diffstat (limited to 'TSRM')
-rw-r--r-- | TSRM/tsrm_win32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index ca121de057..34b0676461 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -804,7 +804,7 @@ static zend_always_inline void UnixTimeToFileTime(time_t t, LPFILETIME pft) /* { // Note that LONGLONG is a 64-bit value LONGLONG ll; - ll = Int32x32To64(t, 10000000) + 116444736000000000; + ll = t * 10000000 + 116444736000000000; pft->dwLowDateTime = (DWORD)ll; pft->dwHighDateTime = ll >> 32; } |