From bf242d58e77d50d4d8fdaaaca7ede686ec4467c0 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 13 Jul 2019 09:40:50 +0200 Subject: Fix #78282: atime and mtime mismatch The fix for bug #78241 assumed that `time_t` would always be 64bit, but actually is 32bit for x86. We therefore enforce 64bit arithmetic to avoid wrapping. --- NEWS | 3 +++ TSRM/tsrm_win32.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 72451dbc1e..541f16ea55 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,9 @@ PHP NEWS - Recode: . Unbundled the recode extension. (cmb) +- Standard: + . Fixed bug #78282 (atime and mtime mismatch). (cmb) + 11 Jul 2019, PHP 7.4.0alpha3 - Core: diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index e510c61426..e16c946131 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -769,7 +769,7 @@ static zend_always_inline void UnixTimeToFileTime(time_t t, LPFILETIME pft) /* { // Note that LONGLONG is a 64-bit value LONGLONG ll; - ll = t * 10000000 + 116444736000000000; + ll = t * 10000000LL + 116444736000000000LL; pft->dwLowDateTime = (DWORD)ll; pft->dwHighDateTime = ll >> 32; } -- cgit v1.2.1