From: Anatol Belski <ab@php.net> Date: Tue, 3 Apr 2018 15:24:13 +0000 (+0200) Subject: Sync fix for bug #72498 for 32-bit X-Git-Tag: php-7.1.17RC1~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=821f13fd7958caac1e7a605d0df8ad8718fdb699;p=php Sync fix for bug #72498 for 32-bit --- diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index 4cfe72fc99..a746d61837 100644 --- a/ext/com_dotnet/com_variant.c +++ b/ext/com_dotnet/com_variant.c @@ -1012,13 +1012,13 @@ PHP_FUNCTION(variant_date_from_timestamp) tzset(); ttstamp = timestamp; tmv = localtime(&ttstamp); -#if ZEND_ENABLE_ZVAL_LONG64 + /* Invalid after 23:59:59, December 31, 3000, UTC */ if (!tmv) { php_error_docref(NULL, E_WARNING, "Invalid timestamp " ZEND_LONG_FMT, timestamp); RETURN_FALSE; } -#endif + memset(&systime, 0, sizeof(systime)); systime.wDay = tmv->tm_mday; diff --git a/ext/com_dotnet/tests/bug72498.phpt b/ext/com_dotnet/tests/bug72498.phpt index e155735ba5..c5aad0cccc 100644 --- a/ext/com_dotnet/tests/bug72498.phpt +++ b/ext/com_dotnet/tests/bug72498.phpt @@ -3,7 +3,6 @@ Bug #72498 variant_date_from_timestamp null dereference --SKIPIF-- <?php # vim:ft=php if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present"; -if (PHP_INT_SIZE != 8) print "skip 64-bit only"; ?> --FILE-- <?php