summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2019-07-13 09:40:50 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2019-07-13 09:44:46 +0200
commitbf242d58e77d50d4d8fdaaaca7ede686ec4467c0 (patch)
tree5c990d79f04f22a6411c7d4c1cee22103529acba
parent1c1de0c41a74b4deadd11cb18f00f115db0568ec (diff)
downloadphp-git-bf242d58e77d50d4d8fdaaaca7ede686ec4467c0.tar.gz
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.
-rw-r--r--NEWS3
-rw-r--r--TSRM/tsrm_win32.c2
2 files changed, 4 insertions, 1 deletions
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;
}