Compare commits

...
536 Commits
Author SHA1 Message Date
Remi Collet 8148cbb788 Update versions for PHP 7.2.0 2017-11-28 09:08:22 +00:00
Remi Collet c950e9807c Update NEWS for PHP 7.2.0 2017-11-28 09:08:22 +00:00
Remi Collet 94a750fcf6 drop -dev from Zend version 2017-11-28 08:00:45 +01:00
Remi Collet fe76e60f8d unset date (will be set by release process script) 2017-11-28 07:50:41 +01:00
Remi Collet 5b7cc8a8ac Prepare NEWS file for release
- set release date
- merge all alpha/beta/RC entries
- clean entries already in 7.1
2017-11-27 12:47:05 +01:00
Remi Collet b2014cd54d add 7.1 NEW entries 2017-11-23 11:11:15 +01:00
Remi Collet 57e5ba662d NEWS 2017-11-15 15:33:09 +01:00
Sara Golemon 96016087a4 Bugfix#75515 php://streams behaving greedily
5060fc23 attempted to fix #68948 by treating all non-uri streams
as non-blocking, however php://fd/* streams (which includes stdin)
may block if the other end of the IPC isn't finished.

This represents a partial revert to the pre RC6 state,
but includes an escape hatch for php://memory and php://temp
streams which are local to the current process.

This also restores stream_set_chunk_size test to previous state.
2017-11-15 15:31:09 +01:00
Derick Rethans caa630a7fe Revert "date module, replacing abs call with the llabs's like one due to bigger type"
This reverts commit c189845951.
2017-11-07 15:58:55 +01:00
Sara Golemon 7beb96ee4c Update NEWS for 7.2.0 2017-11-07 11:58:59 +00:00
Sara Golemon 29cd6eb799 Update NEWS for PHP 7.2.0RC6 2017-11-07 11:33:56 +00:00
Anatol Belski b6336b0d3e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  7.0.27 next
2017-11-07 10:10:41 +01:00
Anatol Belski c842e1ac53 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  7.0.27 next
2017-11-07 10:09:52 +01:00
Anatol Belski bc7d4dc523 7.0.27 next 2017-11-07 10:07:52 +01:00
David Carlier c189845951 date module, replacing abs call with the llabs's like one due to bigger type 2017-11-07 05:27:27 +00:00
Michael Moravec f70ca770b6 Revert BC break caused by fixing bug #74035
This reverts commit 9ffc6ca62f.
2017-11-06 17:52:17 -05:00
Simon JAILLET 5060fc2349 Fixes #68948 related to a BC break introduced by #68532 fix. 2017-11-06 17:34:42 -05:00
Christoph M. Becker b152633ecb Scale support for bcmod()
As of commit 90dcbbe (PHP-7.2+) bcmod() supports non-integral
parameters as well. Since formerly only integer modulus has been
supported, it did not make much sense to cater to the scale with regard
to the result. However, now it does for consistency with other BCMath
operations.

Therefore, we add support for an optional `scale` parameter and fall
back to the default scale (`bcmath.scale`) as usual.
2017-11-06 17:26:52 -05:00
Tyson Andre 5cdf37e603 Fix proto documents for new global functions
See NEWS and UPGRADING (or arginfo/implementation) for details.
2017-11-06 07:24:42 +00:00
Tyson Andre 88e94a0bd1 Mention spl_object_id in UPGRADING notes
This was implemented in PR #2611
2017-11-06 07:18:39 +00:00
Joe Watkins c3ee17065b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix wrong check of definition_phi->constraint.range.max_ssa_var
2017-11-03 17:49:52 +00:00
MITSUNARI Shigeo 21dbd2ffcd fix wrong check of definition_phi->constraint.range.max_ssa_var 2017-11-03 17:49:42 +00:00
Anatol Belski 0166e5c466 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update libs_version.txt
2017-11-02 22:46:25 +01:00
Anatol Belski 91c7460c53 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Update libs_version.txt
2017-11-02 22:44:27 +01:00
Anatol Belski c3be49e07d Update libs_version.txt 2017-11-02 22:41:12 +01:00
Nikita Popov f3c7e1cefb Merge branch 'PHP-7.1' into PHP-7.2 2017-11-02 20:56:35 +01:00
Nikita Popov 1f736085f1 Merge branch 'PHP-7.0' into PHP-7.1 2017-11-02 20:56:25 +01:00
Nikita Popov d88ef8d7e1 Fix ext/soap/tests/bug69137.phpt
Switch to example.org. Also mark it as an online test.
2017-11-02 20:56:03 +01:00
Anatol Belski 8a4702223d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync and fix tests for ICU 60.1 compat
2017-11-02 12:39:04 +01:00
Anatol Belski e8af216ce5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Sync and fix tests for ICU 60.1 compat
2017-11-02 12:38:32 +01:00
Anatol Belski dbfa0140ae Sync and fix tests for ICU 60.1 compat 2017-11-02 12:37:04 +01:00
Anatol Belski 5a3688fe2c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Yet one /nologo
2017-11-02 09:24:22 +01:00
Anatol Belski ba50b27284 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Yet one /nologo
2017-11-02 09:22:25 +01:00
Anatol Belski f5358c0e23 Yet one /nologo 2017-11-02 09:21:22 +01:00
Anatol Belski da9da5742c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix year
  Add /nologo
2017-10-31 10:38:18 +01:00
Anatol Belski 98422cfa3d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix year
  Add /nologo
2017-10-31 10:35:59 +01:00
Anatol Belski 8a3e2a6b14 Fix year 2017-10-31 10:25:15 +01:00
Anatol Belski 164167f3da Add /nologo 2017-10-31 10:24:34 +01:00
Anatol Belski e3b2859c8a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Add missing ICU version check
2017-10-30 18:16:47 +01:00
Anatol Belski 6eb4daabeb Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add missing ICU version check
2017-10-30 18:16:03 +01:00
Anatol Belski 68c500421c Add missing ICU version check 2017-10-30 18:15:26 +01:00
Jakub Zelenka 19c62e83fa Merge branch 'PHP-7.1' into PHP-7.2 2017-10-30 16:43:36 +00:00
Jakub Zelenka 7c2031bfca Merge branch 'PHP-7.0' into PHP-7.1 2017-10-30 16:42:23 +00:00
Jakub Zelenka fc169d2133 Prevent leaking x509 and csr resources if it is not requested
All functions using php_openssl_x509_from_zval or php_openssl_csr_from_zval
with makeresource equal to 0 do not deref the resource which means there
is a leak till the end of the request. This can cause issues for long
running apps. It is a generic solution for bug #75363 which also covers
other functions.
2017-10-30 16:40:56 +00:00
Jakub Zelenka d8ccffa79a Extend and speed up pkey export tests 2017-10-30 16:40:56 +00:00
Jakub Zelenka e78e839e53 Rewrite openssl_csr_get_subject test to improve coverage 2017-10-30 16:40:56 +00:00
Jakub Zelenka 528aa540b4 Add openssl_csr_get_public_key test 2017-10-30 16:40:56 +00:00
Jakub Zelenka 548798818b Extend openssl_pkcs7_* tests to cover resource cert 2017-10-30 16:40:56 +00:00
Jakub Zelenka 55d92413b9 Fix cleaning tmp output file in openssl_csr_export_to_file test 2017-10-30 16:40:56 +00:00
Jelle van der Waa 5812f7a8d3 openssl: add basic openssl_csr_export_to_file tests
Add a basic test for openssl_csr_export_to_file.
2017-10-30 16:40:56 +00:00
Jakub Zelenka 628a52d365 Extend openssl_csr_sign test to cover cert resource 2017-10-30 16:40:56 +00:00
Jakub Zelenka 80191eebec Set different invalid path in openssl_pkcs12_export so it is more unlikely to exist 2017-10-30 16:40:55 +00:00
Jakub Zelenka cd66aad141 Extend openssl_x509_parse to cover cert resource 2017-10-30 16:40:55 +00:00
Jakub Zelenka c1d98588a2 Rename and test resource cert in openssl_x509_checkpurpose test 2017-10-30 16:40:55 +00:00
Jakub Zelenka d23d4fd61b Extend openssl_x509_check_private_key to test resource cert 2017-10-30 16:40:55 +00:00
Jakub Zelenka be0758b75a Extend openssl_x509_fingerprint test to cover resource cert with sha1 2017-10-30 16:40:55 +00:00
Joe Watkins ccba0f5948 Merge branch 'PHP-7.2' of git.php.net:/php-src into PHP-7.2
* 'PHP-7.2' of git.php.net:/php-src:
  Yet one attempt to mitigate the unzip error on AppVeyor
  Ensure SDK is checked out before asking for version
  Fix fetching the SDK version
  Fix SDK version comparison and add more verbosity
  Don't use the cache dependency, SDK version is handled in script
  Remove status check on the SDK repo and add version check
  Use abbrev
  Catch with the latest AppVeyor unzip errors
  Fixed type inference
2017-10-30 14:16:38 +00:00
Joe Watkins 37b0ad5537 Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1
* 'PHP-7.1' of git.php.net:/php-src:
  Yet one attempt to mitigate the unzip error on AppVeyor
  Ensure SDK is checked out before asking for version
  Fix fetching the SDK version
  Fix SDK version comparison and add more verbosity
  Don't use the cache dependency, SDK version is handled in script
  Remove status check on the SDK repo and add version check
  Use abbrev
  Catch with the latest AppVeyor unzip errors
  Fixed type inference
2017-10-30 14:16:27 +00:00
Joe Watkins cfa885830a Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src:
  Yet one attempt to mitigate the unzip error on AppVeyor
  Ensure SDK is checked out before asking for version
  Fix fetching the SDK version
  Fix SDK version comparison and add more verbosity
  Don't use the cache dependency, SDK version is handled in script
  Remove status check on the SDK repo and add version check
  Catch with the latest AppVeyor unzip errors
2017-10-30 14:16:16 +00:00
Joe Watkins 118db2d2f7 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #75464 Wrong reflection on SoapClient::__setSoapHeaders
2017-10-30 14:14:21 +00:00
Joe Watkins 5262bd9ea3 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #75464 Wrong reflection on SoapClient::__setSoapHeaders
2017-10-30 14:13:31 +00:00
Fabien Villepinte a308000ff2 Fix bug #75464 Wrong reflection on SoapClient::__setSoapHeaders 2017-10-30 14:13:05 +00:00
Anatol Belski f10d8c21ab Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Yet one attempt to mitigate the unzip error on AppVeyor
2017-10-30 12:20:24 +01:00
Anatol Belski a2cd2965d7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Yet one attempt to mitigate the unzip error on AppVeyor
2017-10-30 12:17:53 +01:00
Anatol Belski 7ea44da104 Yet one attempt to mitigate the unzip error on AppVeyor 2017-10-30 12:16:53 +01:00
Anatol Belski 8be5bb8b10 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Ensure SDK is checked out before asking for version
2017-10-30 12:09:15 +01:00
Anatol Belski c32e53b641 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Ensure SDK is checked out before asking for version
2017-10-30 12:08:50 +01:00
Anatol Belski e305e8fb7a Ensure SDK is checked out before asking for version 2017-10-30 12:07:27 +01:00
Anatol Belski ddcef0fc0f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix fetching the SDK version
2017-10-30 11:30:19 +01:00
Anatol Belski dfadda3d09 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix fetching the SDK version
2017-10-30 11:29:40 +01:00
Anatol Belski 7bf2947016 Fix fetching the SDK version 2017-10-30 11:28:32 +01:00
Xinchen Hui d4b81223cd Merge branch 'PHP-7.2' of git.php.net:/php-src into PHP-7.2
* 'PHP-7.2' of git.php.net:/php-src:
  Fix SDK version comparison and add more verbosity
  Don't use the cache dependency, SDK version is handled in script
2017-10-30 18:21:00 +08:00
Xinchen Hui 6336c4f629 Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1
* 'PHP-7.1' of git.php.net:/php-src:
  Fix SDK version comparison and add more verbosity
  Don't use the cache dependency, SDK version is handled in script
2017-10-30 18:20:20 +08:00
Xinchen Hui db4eb54149 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Use abbrev
2017-10-30 18:17:41 +08:00
Xinchen Hui a3286a8ee4 Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1
* 'PHP-7.1' of git.php.net:/php-src:
  Remove status check on the SDK repo and add version check
2017-10-30 18:17:27 +08:00
Anatol Belski a438a633e9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix SDK version comparison and add more verbosity
  Don't use the cache dependency, SDK version is handled in script
2017-10-30 11:16:33 +01:00
Anatol Belski bba09a53f4 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix SDK version comparison and add more verbosity
  Don't use the cache dependency, SDK version is handled in script
2017-10-30 11:15:51 +01:00
Anatol Belski c6e8c2bc9f Fix SDK version comparison and add more verbosity 2017-10-30 10:53:12 +01:00
Anatol Belski 591e811a35 Don't use the cache dependency, SDK version is handled in script 2017-10-30 10:34:11 +01:00
Anatol Belski e5179054fb Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Remove status check on the SDK repo and add version check
2017-10-30 10:17:25 +01:00
Anatol Belski f361caa5c0 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Remove status check on the SDK repo and add version check
2017-10-30 10:16:39 +01:00
Anatol Belski bc410c2609 Remove status check on the SDK repo and add version check
If Appveyor fails to unzip, .git would be in an arbitrary state anyway.
Thus this check doesn't help. For the version check - rely on the branch
naming scheme in the SDK.
2017-10-30 10:14:05 +01:00
Xinchen Hui d9de0f8683 Use abbrev 2017-10-30 16:26:59 +08:00
Anatol Belski af6ba57d95 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Catch with the latest AppVeyor unzip errors
2017-10-30 08:57:29 +01:00
Anatol Belski 26eb6c5bab Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Catch with the latest AppVeyor unzip errors
2017-10-30 08:56:52 +01:00
Dmitry Stogov 49256dcf6f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed type inference
2017-10-30 10:44:12 +03:00
Anatol Belski 741efa7807 Catch with the latest AppVeyor unzip errors 2017-10-30 08:42:59 +01:00
Dmitry Stogov 230e505fd8 Fixed type inference 2017-10-30 10:41:27 +03:00
Joe Watkins 1a72d3225c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #75453 Incorrect reflection on ibase_connect and ibase_pconnect
2017-10-30 06:55:58 +00:00
Joe Watkins 63c0ecc445 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #75453 Incorrect reflection on ibase_connect and ibase_pconnect
2017-10-30 06:55:28 +00:00
Fabien Villepinte e6aea3dc78 Fix bug #75453 Incorrect reflection on ibase_connect and ibase_pconnect 2017-10-30 06:55:00 +00:00
Anatol Belski 2c317bea2c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Re-enable AppVeyor cache
2017-10-29 10:09:45 +01:00
Anatol Belski 83d51baf83 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Re-enable AppVeyor cache
2017-10-29 10:09:18 +01:00
Anatol Belski 123b1d79eb Re-enable AppVeyor cache 2017-10-29 10:08:31 +01:00
Joe Watkins cb04599d27 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  make sure run-tests reports exit status upon prerequisite error
2017-10-29 04:38:08 +00:00
Joe Watkins 6c90612d13 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  make sure run-tests reports exit status upon prerequisite error
2017-10-29 04:37:55 +00:00
Joe Watkins 59d413ceb8 make sure run-tests reports exit status upon prerequisite error 2017-10-29 04:37:21 +00:00
Nikita Popov 58f90ab569 Merge branch 'PHP-7.1' into PHP-7.2 2017-10-28 12:58:23 +02:00
Nikita Popov 27856f64c3 Merge branch 'PHP-7.0' into PHP-7.1 2017-10-28 12:57:46 +02:00
Fabien Villepinte 938f256ed9 Fix bug #75434 Wrong reflection for mysqli_fetch_all function 2017-10-28 12:57:25 +02:00
Sara Golemon cc96166f74 Don't optimize input arrays with suffix holes 2017-10-27 13:07:33 -04:00
Joe Watkins f2367d4626 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #75307 Wrong reflection for openssl_open function
2017-10-27 16:06:57 +01:00
Joe Watkins 14be7dcf8e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #75307 Wrong reflection for openssl_open function
2017-10-27 16:06:29 +01:00
Fabien Villepinte 51ea2cfbe1 Fix bug #75307 Wrong reflection for openssl_open function 2017-10-27 16:06:01 +01:00
Anatol Belski cbf385e68c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Skip test on PostgreSQL 10
2017-10-27 16:23:50 +02:00
Anatol Belski 005205714b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Skip test on PostgreSQL 10
2017-10-27 16:23:19 +02:00
Anatol Belski 15a71fe045 Skip test on PostgreSQL 10
The 42P18 error is not produced by the server anymore.
2017-10-27 16:19:42 +02:00
Anatol Belski f936a17c12 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix test compat for PostgreSQL 10
2017-10-27 15:04:54 +02:00
Anatol Belski 36b27f2ba5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix test compat for PostgreSQL 10
2017-10-27 15:04:29 +02:00
Anatol Belski 24b1bb0abd Fix test compat for PostgreSQL 10 2017-10-27 14:58:43 +02:00
Anatol Belski 40f76c9f0c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Apply upstream patch for CVE-2017-14107
  Backport and apply upstream patch for CVE-2017-14107
2017-10-27 14:18:27 +02:00
Anatol Belski 211dacd7b5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Apply upstream patch for CVE-2017-14107
  Backport and apply upstream patch for CVE-2017-14107
2017-10-27 14:17:57 +02:00
Anatol Belski 10dc1950f7 Apply upstream patch for CVE-2017-14107 2017-10-27 13:20:15 +02:00
Anatol Belski f0a42d9fe4 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Backport and apply upstream patch for CVE-2017-14107
2017-10-27 13:18:41 +02:00
Anatol Belski f6e8ce8121 Backport and apply upstream patch for CVE-2017-14107 2017-10-27 13:16:56 +02:00
Anatol Belski f577a03c04 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Binary SDK 2.0.12 stable
2017-10-26 21:27:09 +02:00
Anatol Belski fb1c573a29 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Binary SDK 2.0.12 stable
2017-10-26 21:26:03 +02:00
Anatol Belski 9eb6f86765 Binary SDK 2.0.12 stable 2017-10-26 21:25:08 +02:00
Dmitry Stogov 1d846fdfb2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed indirect modification of magic ArrayAccess method arguments
2017-10-26 16:07:49 +03:00
Dmitry Stogov 503df277ab Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed indirect modification of magic ArrayAccess method arguments
2017-10-26 16:04:20 +03:00
Dmitry Stogov 98eee90734 Fixed indirect modification of magic ArrayAccess method arguments 2017-10-26 16:03:42 +03:00
Dmitry Stogov 25d988e91a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Backport tests
2017-10-26 14:12:45 +03:00
Dmitry Stogov d3146889ab Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Backport tests
2017-10-26 14:12:33 +03:00
Dmitry Stogov 502cfddf28 Backport tests 2017-10-26 14:12:08 +03:00
Dmitry Stogov e3997b2c82 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed indirect modification of magic method arguments.
2017-10-26 13:12:52 +03:00
Dmitry Stogov 177cdcf313 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed indirect modification of magic method arguments.
2017-10-26 13:11:59 +03:00
Dmitry Stogov bc59289b7a Fixed indirect modification of magic method arguments. 2017-10-26 13:05:23 +03:00
Xinchen Hui 887ae8a380 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed test
2017-10-26 10:24:00 +08:00
Xinchen Hui 6b637ac589 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed test
2017-10-26 10:23:52 +08:00
Xinchen Hui eaeccc1d99 Fixed test 2017-10-26 10:23:43 +08:00
Xinchen Hui ed02dce2a4 Update NEWS 2017-10-26 10:11:13 +08:00
Xinchen Hui 11a4b57e61 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #75420 (Crash when modifing property name in __isset for BP_VAR_IS)
2017-10-26 10:09:57 +08:00
Xinchen Hui 7d3c057bd1 Update NEWS 2017-10-26 10:09:41 +08:00
Xinchen Hui 3c4c9a23bc Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75420 (Crash when modifing property name in __isset for BP_VAR_IS)

Conflicts:
	Zend/zend_object_handlers.c
2017-10-26 10:08:39 +08:00
Xinchen Hui d2047503cb Fixed bug #75420 (Crash when modifing property name in __isset for BP_VAR_IS) 2017-10-26 10:07:08 +08:00
Joe Watkins 25a3ebdc73 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix typo in comments
2017-10-25 21:00:03 +01:00
Joe Watkins 5e9f7f619e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix typo in comments
2017-10-25 20:59:51 +01:00
Fabien Villepinte 578ba71b3b Fix typo in comments 2017-10-25 20:59:40 +01:00
Anatol Belski 777e189445 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Don't create plist files when using clang analyzer
2017-10-25 18:11:40 +02:00
Anatol Belski 8ad4de887f Don't create plist files when using clang analyzer 2017-10-25 18:06:56 +02:00
Christoph M. Becker a059244b3c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix the SKIPIF part in /ext/gd/tests/bug75437.phpt
2017-10-25 14:53:01 +02:00
Christoph M. Becker b6b0289f5e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix the SKIPIF part in /ext/gd/tests/bug75437.phpt
2017-10-25 14:47:11 +02:00
Fabien Villepinte e763a1cdc7 Fix the SKIPIF part in /ext/gd/tests/bug75437.phpt 2017-10-25 14:39:38 +02:00
Christoph M. Becker c78813a6b8 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #75437 Wrong reflection on imagewebp
2017-10-25 13:03:42 +02:00
Christoph M. Becker 9d59beb8ba Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #75437 Wrong reflection on imagewebp
2017-10-25 12:56:25 +02:00
Fabien Villepinte 0fbb9f343f Fix bug #75437 Wrong reflection on imagewebp 2017-10-25 12:54:05 +02:00
Ferenc Kovacs 58ccfb051b Merge branch 'PHP-7.1' into PHP-7.2 2017-10-25 03:42:55 +02:00
Ferenc Kovacs 298db6fc92 Merge branch 'PHP-7.0' into PHP-7.1 2017-10-25 03:40:49 +02:00
Ferenc Kovacs 9fbf13a496 Merge branch 'PHP-5.6' into PHP-7.0 2017-10-25 03:39:34 +02:00
Ferenc Kovacs f600785f65 5.6.33 is next 2017-10-25 03:36:30 +02:00
Ferenc Kovacs 92dd3df148 Merge branch 'PHP-7.1' into PHP-7.2 2017-10-25 03:20:34 +02:00
Ferenc Kovacs 9e47f868d3 Merge branch 'PHP-7.0' into PHP-7.1 2017-10-25 03:17:14 +02:00
Ferenc Kovacs b53fb886a4 use trusty explicitly 2017-10-25 03:14:51 +02:00
Ferenc Kovacs 6125ce9d33 Merge branch 'PHP-5.6' into PHP-7.0 2017-10-25 03:13:40 +02:00
Rasmus Lerdorf ad7ed6fe21 These tests all assume that IPV6 is available. 2017-10-25 02:21:16 +02:00
Ferenc Kovacs 787e3a1ee4 fix the travis build for PHP-5.6 using precise instead of trusty 2017-10-25 01:51:48 +02:00
Ferenc Kovacs 9839d3a953 fix the travis build for PHP-5.6 using precise instead of trusty 2017-10-25 01:47:50 +02:00
Sara Golemon a8ffc69288 Update NEWS for 7.2.0RC6 2017-10-24 14:32:38 -04:00
Sara Golemon 98f28a911c Update NEWS for PHP 7.2.0RC5 2017-10-24 14:32:38 -04:00
Anatol Belski ffeb8d1b03 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Parametrize the expected value to avoid platform false positives
2017-10-24 18:38:44 +02:00
Anatol Belski 67b99b698f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Parametrize the expected value to avoid platform false positives
2017-10-24 18:38:23 +02:00
Anatol Belski e19bf29b53 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Parametrize the expected value to avoid platform false positives
2017-10-24 18:36:56 +02:00
Anatol Belski 45ac5edbd9 Parametrize the expected value to avoid platform false positives 2017-10-24 18:33:21 +02:00
Sara Golemon d0d7db8b3f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Decref default_link when clearing
2017-10-24 11:38:24 -04:00
Sara Golemon 53fe84bfcc Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Decref default_link when clearing
2017-10-24 11:38:17 -04:00
Sara Golemon 68e27b0763 Decref default_link when clearing 2017-10-24 11:37:59 -04:00
Christoph M. Becker c04617aa61 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #65148 (imagerotate may alter image dimensions)
2017-10-24 17:17:18 +02:00
Christoph M. Becker 9c79de4d62 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #65148 (imagerotate may alter image dimensions)
2017-10-24 17:09:59 +02:00
Christoph M. Becker 22c487616f Fixed bug #65148 (imagerotate may alter image dimensions)
We apply the respective patches from external libgd, work around the
still missing `gdImageClone()`, and fix the special cased rotation
routines according to Pierre's patch
(https://gist.github.com/pierrejoye/59d72385ed1888cf8894a7ed437235ae).

We also cater to bug73272.phpt whose result obviously changes a bit.
2017-10-24 17:02:56 +02:00
Derick Rethans ca23b0484c Merge branch 'PHP-7.1' into PHP-7.2 2017-10-24 14:56:24 +01:00
Derick Rethans 7bc31238b4 Merge branch 'PHP-7.0' into PHP-7.1 2017-10-24 14:55:48 +01:00
Derick Rethans 8e3260376c Update timezonemap.h, which needs to match the bundled TZ db 2017-10-24 14:55:13 +01:00
Anatol Belski 4ec299437d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix test
2017-10-24 14:58:56 +02:00
Anatol Belski 8ad71bc1d2 Fix test 2017-10-24 14:58:01 +02:00
Anatol Belski ab85763997 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] update NEWS
  [ci skip] update NEWS
  [ci skip] update NEWS
2017-10-24 14:22:44 +02:00
Anatol Belski ab8c0f194a [ci skip] update NEWS 2017-10-24 14:22:25 +02:00
Anatol Belski c05fcc4687 [ci skip] update NEWS 2017-10-24 14:21:11 +02:00
Anatol Belski 0b5825d0e9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] update NEWS
  [ci skip] update NEWS
2017-10-24 14:19:45 +02:00
Anatol Belski 75d0ba5179 [ci skip] update NEWS 2017-10-24 14:18:59 +02:00
Anatol Belski fadcfc8149 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  [ci skip] update NEWS
2017-10-24 14:17:21 +02:00
Anatol Belski 7d06a5c89f [ci skip] update NEWS 2017-10-24 14:16:54 +02:00
Anatol Belski 176c9b61a4 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #72535 arcfour encryption stream filter crashes php
2017-10-24 14:07:32 +02:00
Anatol Belski 9138966c67 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72535 arcfour encryption stream filter crashes php
2017-10-24 14:05:18 +02:00
Anatol Belski 968c8fc0d5 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed bug #72535 arcfour encryption stream filter crashes php
2017-10-24 14:04:08 +02:00
Anatol Belski 37acebcc8c Fixed bug #72535 arcfour encryption stream filter crashes php 2017-10-24 13:59:18 +02:00
Anatol Belski e97b10f1a0 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75055 Out-Of-Bounds Read in timelib_meridian()
  Apply upstream patch for CVE-2016-1283
2017-10-24 13:45:16 +02:00
Anatol Belski 4d31ee9043 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75055 Out-Of-Bounds Read in timelib_meridian()
  Apply upstream patch for CVE-2016-1283
2017-10-24 13:44:03 +02:00
Anatol Belski 5efbcd1882 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed bug #75055 Out-Of-Bounds Read in timelib_meridian()
  Apply upstream patch for CVE-2016-1283
2017-10-24 13:38:48 +02:00
Anatol Belski a7815e63bd Fixed bug #75055 Out-Of-Bounds Read in timelib_meridian() 2017-10-24 11:28:17 +02:00
Anatol Belski d37658be6c Apply upstream patch for CVE-2016-1283
Fix bug #75207, see also
https://bugzilla.redhat.com/show_bug.cgi?id=1295385
https://vcs.pcre.org/pcre?view=revision&revision=1636

(cherry picked from commit d11fceab15)
2017-10-24 11:10:11 +02:00
Sara Golemon e83e187a9f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  NEWS entry for pg_close() fix
2017-10-23 14:56:50 -04:00
Sara Golemon 1758525df9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  NEWS entry for pg_close() fix
2017-10-23 14:56:10 -04:00
Sara Golemon 9fca585488 NEWS entry for pg_close() fix 2017-10-23 14:55:32 -04:00
Sara Golemon ece23ea20f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Bugfix#75419 Fix clearing of default link during pg_close()
2017-10-23 14:44:40 -04:00
Sara Golemon 781521e112 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Bugfix#75419 Fix clearing of default link during pg_close()
2017-10-23 14:44:28 -04:00
Sara Golemon a645af4456 Bugfix#75419 Fix clearing of default link during pg_close() 2017-10-23 14:44:00 -04:00
Anatol Belski b4db9e9acc Update libmagic.patch 2017-10-23 19:18:25 +02:00
Anatol Belski 734c1f3cd4 Fail hard when re2c is not found or the version requirement not met
With 7.2, the binary SDK supplies the minimal required version, thus no
reason to fail later at the compilation time.
2017-10-23 19:01:14 +02:00
Anatol Belski fb0be397d0 Fix mismatching alloc 2017-10-23 18:49:17 +02:00
Derick Rethans 12e2fc4ab6 Updated to version 2017.3 (2017c) 2017-10-23 17:31:23 +01:00
Derick Rethans 9290c826fa Empty merge 2017-10-23 17:31:23 +01:00
Derick Rethans b07b526b95 Updated to version 2017.3 (2017c) 2017-10-23 17:31:21 +01:00
Derick Rethans eca1623f1b Empty merge 2017-10-23 17:31:21 +01:00
Derick Rethans b2dfcb30eb Updated to version 2017.3 (2017c) 2017-10-23 17:31:20 +01:00
Anatol Belski 9beb743b07 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix memory leak
2017-10-23 15:40:37 +02:00
Anatol Belski 5b497797f2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix memory leak
2017-10-23 15:40:05 +02:00
Anatol Belski 1cb2079d6c Fix memory leak 2017-10-23 15:26:08 +02:00
Anatol Belski 0e44c980f9 Fix uninitialized vars 2017-10-23 12:02:41 +02:00
Anatol Belski 8f35685744 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Renaming cache folder is not a solution, too. Disable cache for now.
  Revert "Rename build cache folder and separate sdk"
2017-10-23 07:14:14 +02:00
Anatol Belski 0a3ea6091c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Renaming cache folder is not a solution, too. Disable cache for now.
  Revert "Rename build cache folder and separate sdk"
2017-10-23 07:13:51 +02:00
Anatol Belski 9f00e26008 Renaming cache folder is not a solution, too. Disable cache for now. 2017-10-23 07:13:00 +02:00
Anatol Belski c9a14b3aee Revert "Rename build cache folder and separate sdk"
This reverts commit 58dd892156.
2017-10-23 07:12:33 +02:00
Anatol Belski bba881e424 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Rename build cache folder and separate sdk
  Revert "Invalidate the whole cache when .appveyor.yml was changed"
2017-10-23 07:09:52 +02:00
Anatol Belski a10ef3d5cc Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Rename build cache folder and separate sdk
  Revert "Invalidate the whole cache when .appveyor.yml was changed"
2017-10-23 07:09:35 +02:00
Anatol Belski 58dd892156 Rename build cache folder and separate sdk 2017-10-23 07:08:45 +02:00
Anatol Belski eead6bf97a Revert "Invalidate the whole cache when .appveyor.yml was changed"
This reverts commit 25d40602cb.
2017-10-23 07:05:48 +02:00
Anatol Belski ae5dbea5e7 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Invalidate the whole cache when .appveyor.yml was changed
2017-10-23 07:02:15 +02:00
Anatol Belski a2c9ba78dd Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Invalidate the whole cache when .appveyor.yml was changed
2017-10-23 07:01:43 +02:00
Anatol Belski 25d40602cb Invalidate the whole cache when .appveyor.yml was changed 2017-10-23 07:00:36 +02:00
Jakub Zelenka e33721978e Merge branch 'PHP-7.1' into PHP-7.2 2017-10-22 18:58:15 +01:00
Jakub Zelenka f10fd89f99 Merge branch 'PHP-7.0' into PHP-7.1 2017-10-22 18:57:14 +01:00
Jakub Zelenka 34ed75fab7 Fix clean up for openssl_pkcs12_export_to_file_basic 2017-10-22 18:54:15 +01:00
Jelle van der Waa 314bef5d03 openssl: Fix openssl_pkcs12_export extracerts test
Fix the openssl_pkcs12_export testcase for extracerts, the 'extracerts'
option needs to be the key of the certificate value otherwise
openssl_pkcs12_export will ignore it.
2017-10-22 18:53:30 +01:00
Anatol Belski bb0a15f499 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  With ICU 58+, set the default restriction level to high
2017-10-21 17:24:42 +02:00
Anatol Belski e986f71527 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  With ICU 58+, set the default restriction level to high
2017-10-21 17:24:15 +02:00
Anatol Belski 1d781fbdb1 With ICU 58+, set the default restriction level to high
Further experiments show, that CJK scripts should be ok. If there are
any issues, the moderate level can still be set later.
2017-10-21 17:21:41 +02:00
Anatol Belski ff1b1c2761 Add TZ and Unicode versions to intl MINFO 2017-10-21 16:17:31 +02:00
Anatol Belski 73d68ff3e0 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Reenable AppVeyor cache
2017-10-21 12:00:26 +02:00
Anatol Belski 5ce28090e0 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Reenable AppVeyor cache
2017-10-21 12:00:02 +02:00
Anatol Belski 44b3bc847b Reenable AppVeyor cache 2017-10-21 11:59:22 +02:00
Anatol Belski 839b3d1677 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Disable AppVeyor cache to unlock build
2017-10-21 10:52:48 +02:00
Anatol Belski f588a02463 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Disable AppVeyor cache to unlock build
2017-10-21 10:52:22 +02:00
Anatol Belski 0b71ae7a15 Disable AppVeyor cache to unlock build 2017-10-21 10:49:20 +02:00
Anatol Belski 3eb7ea55ae Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Rework these new tests to match with diffs in ICU 58, 59 and upcoming 60
2017-10-21 10:30:43 +02:00
Anatol Belski 88ec44dfe3 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Rework these new tests to match with diffs in ICU 58, 59 and upcoming 60
2017-10-21 10:30:14 +02:00
Anatol Belski 5d85d967bd Rework these new tests to match with diffs in ICU 58, 59 and upcoming 60 2017-10-21 10:29:04 +02:00
Anatol Belski 42ccf41e96 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [skip ci] Update NEWS
  [ci skip] Update NEWS
2017-10-20 20:49:17 +02:00
Anatol Belski 858614e92a [ci skip] Update NEWS 2017-10-20 20:48:59 +02:00
Anatol Belski ffa4d48e70 [skip ci] Update NEWS 2017-10-20 20:47:36 +02:00
Anatol Belski f508734e2f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] Update NEWS
2017-10-20 20:47:16 +02:00
Anatol Belski ede8cee9e6 [ci skip] Update NEWS 2017-10-20 20:46:42 +02:00
Anatol Belski 416c993c8e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #73655 Spoofchecker::isSuspicious behavior change due to upstream changes
  Add test for newer ICU version
2017-10-20 20:14:48 +02:00
Anatol Belski 6f395736e2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73655 Spoofchecker::isSuspicious behavior change due to upstream changes
  Add test for newer ICU version
2017-10-20 20:14:08 +02:00
Anatol Belski f95063647c Fixed bug #73655 Spoofchecker::isSuspicious behavior change due to upstream changes
There are significant changes in the spoof checking reflecting
http://www.unicode.org/reports/tr39/tr39-15.html and relying on the
restriction levels. ICU 58+ removes WSC and MSC handling and otherwise
undergoes big changes in both code and data areas. Keep up with the
basic points for now, as we need to move forward and provide an
acceptable experience to PHP users linking to a newer ICU. The most
distros ATM don't provide ICU > 57.1, though. We'll need for sure to
keep up with the BC breach in ICU 58+ in possible further aspects.
2017-10-20 19:23:32 +02:00
Anatol Belski 2198d38cbc Add test for newer ICU version 2017-10-20 19:02:42 +02:00
Anatol Belski 57fc9fcba4 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Further test fixes for ICU >= 58
  Version checks
2017-10-20 18:40:55 +02:00
Anatol Belski 3d55910f35 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Further test fixes for ICU >= 58
2017-10-20 18:40:26 +02:00
Anatol Belski e02c41fc72 Further test fixes for ICU >= 58 2017-10-20 18:39:46 +02:00
Anatol Belski 7027a1643f Version checks 2017-10-20 18:26:14 +02:00
Anatol Belski fb88cee0fc Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Yet two wrong version checks
2017-10-20 16:55:32 +02:00
Anatol Belski 65d4bd0311 Yet two wrong version checks 2017-10-20 16:54:47 +02:00
Anatol Belski 0f7ddf0d47 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix version checks in tests
  Fix version checks in tests
2017-10-20 15:25:27 +02:00
Anatol Belski ae6d877f54 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix version checks in tests
2017-10-20 15:25:01 +02:00
Anatol Belski 2f444640b4 Fix version checks in tests 2017-10-20 15:24:43 +02:00
Anatol Belski 7240d99838 Fix version checks in tests 2017-10-20 15:23:09 +02:00
Anatol Belski 7775f9e872 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync some tests for compat with ICU 58.1, PHP 7.1+ part
  Sync some tests for compat with ICU 58.1+
2017-10-20 13:58:53 +02:00
Anatol Belski e2afa00b4c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Sync some tests for compat with ICU 58.1+
2017-10-20 13:57:44 +02:00
Anatol Belski 26473523b0 Sync some tests for compat with ICU 58.1, PHP 7.1+ part 2017-10-20 13:56:58 +02:00
Anatol Belski 877e0b04bc Sync some tests for compat with ICU 58.1+ 2017-10-20 13:55:32 +02:00
Anatol Belski 2a361b14ea Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Add skip for incompatible ICU version
2017-10-20 11:30:09 +02:00
Anatol Belski 7751ae59ae Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add skip for incompatible ICU version
2017-10-20 11:28:51 +02:00
Anatol Belski 9071ff5c87 Add skip for incompatible ICU version 2017-10-20 11:27:54 +02:00
Joe Watkins 4b67943501 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed #75317 - UConverter::setDestinationEncoding changes source instead of destinatination
2017-10-19 12:03:19 +01:00
Joe Watkins 8eee20d876 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #75317 - UConverter::setDestinationEncoding changes source instead of destinatination
2017-10-19 12:02:52 +01:00
Nester 80c3b078b8 Fixed #75317 - UConverter::setDestinationEncoding changes source instead of destinatination 2017-10-19 12:02:22 +01:00
Joe Watkins cf91d81b31 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update .editorconfig with some more configs
2017-10-19 11:54:01 +01:00
Joe Watkins 85c243ef66 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Update .editorconfig with some more configs
2017-10-19 11:53:50 +01:00
Peter Kokot aa143515d6 Update .editorconfig with some more configs
Added support for .awk, .w32, .bat, .mk, .frag, .m4, .sh, .php, .phpt,
and Markdown files based on the current most used coding style in the
php-src repository.
2017-10-19 11:53:37 +01:00
Joe Watkins 0397b8c5c5 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix issue with zend signals in php_request_startup
2017-10-19 11:48:27 +01:00
Herman J. Radtke III bb1814b5c3 Fix issue with zend signals in php_request_startup
The zend_signals_activate() function is called in php_request_startup()
even if `--disable-zend-signals` is used. This causes uninitialized
variables to be used on ZTS builds.

This was removed in 7.1 in c870633. Removing guards from the SAPIs
should be fine, but removing the guard from main/main.c prevents anyone
using the static embedded library to integrate PHP into their programs.

For more details, see the "Additional remark" section in
https://bugs.php.net/bug.php?id=74149
2017-10-19 11:48:16 +01:00
Joe Watkins 965daf4349 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Escape newline on curl config.m4
2017-10-19 11:40:48 +01:00
Joe Watkins 925d969f9e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Escape newline on curl config.m4
2017-10-19 11:40:05 +01:00
Ryan Volz 4e85dd0346 Escape newline on curl config.m4 2017-10-19 11:39:54 +01:00
Anatol Belski 2b76520d86 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Move to php-sdk-2.0.0beta3 for Appveyor
2017-10-18 17:47:27 +02:00
Anatol Belski 3c2b087b3e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Move to php-sdk-2.0.0beta3 for Appveyor
2017-10-18 17:46:40 +02:00
Anatol Belski 5f7707cc8a Move to php-sdk-2.0.0beta3 for Appveyor
Supposed to fix sporadic tool crashes on the test image
2017-10-18 17:45:33 +02:00
Anatol Belski 5315cea6e2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Backport 7ff13badda into 7.0+
2017-10-18 16:27:31 +02:00
Anatol Belski 53d8775015 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Backport 7ff13badda into 7.0+
2017-10-18 16:24:23 +02:00
Anatol Belski d82805f097 Backport 7ff13badda into 7.0+ 2017-10-18 16:02:56 +02:00
Anatol Belski 63a0ddb013 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  One more folder to delete in AppVeyor image
2017-10-17 15:37:23 +02:00
Anatol Belski b9b06c4bdf Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  One more folder to delete in AppVeyor image
2017-10-17 15:34:42 +02:00
Anatol Belski 9891f11f84 One more folder to delete in AppVeyor image 2017-10-17 15:32:47 +02:00
Xinchen Hui e53a9aaa4a Fixed bug (assertion fails with extended info generated) 2017-10-17 19:47:29 +08:00
Xinchen Hui 0292456262 Fixed test 2017-10-17 12:20:43 +08:00
Xinchen Hui 2f73f2436a Try to fix test 2017-10-17 11:35:40 +08:00
Tianfang Yang 77ad860bf0 Merge branch 'PHP-7.1' into PHP-7.2 2017-10-16 19:27:21 -04:00
Tianfang Yang d1f43b1a58 Merge branch 'PHP-7.0' into PHP-7.1 2017-10-16 19:24:08 -04:00
Tianfang Yang f955cff54c Fixed valgrind issue 2017-10-16 19:20:24 -04:00
Tianfang Yang aad4544e95 Fixed valgrind issue 2017-10-16 19:16:30 -04:00
Anatol Belski d30477f23a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Move to next binary SDK version for AppVeyor
2017-10-16 18:07:41 +02:00
Anatol Belski c3177f8279 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Move to next binary SDK version for AppVeyor
2017-10-16 18:06:38 +02:00
Anatol Belski 7778106f40 Move to next binary SDK version for AppVeyor 2017-10-16 18:05:56 +02:00
Dmitry Stogov 5d6912d185 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Prevent crash on ext/pdo_mysql/tests/bug_39858.phpt when built with libmysql
2017-10-16 19:02:22 +03:00
Dmitry Stogov c33ca443ee Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Prevent crash on ext/pdo_mysql/tests/bug_39858.phpt when built with libmysql
2017-10-16 19:02:07 +03:00
Dmitry Stogov 8bfe748fb0 Prevent crash on ext/pdo_mysql/tests/bug_39858.phpt when built with libmysql 2017-10-16 19:00:12 +03:00
Xinchen Hui 6fab62e923 Merge branch 'PHP-7.2' of git.php.net:/php-src into PHP-7.2
* 'PHP-7.2' of git.php.net:/php-src:
  [ci skip] Fixed bug #75383 (The date is "Sep", it should say "Oct")
  Properly fix #75363 and address some other leaks with cert
2017-10-16 19:07:55 +08:00
Xinchen Hui 863acd7753 Fixed bug #75378 ([REGRESSION] IntlDateFormatter::parse() does not change $position argument) 2017-10-16 19:07:34 +08:00
Christoph M. Becker 08c04c9245 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] Fixed bug #75383 (The date is "Sep", it should say "Oct")
2017-10-16 11:12:17 +02:00
Christoph M. Becker 200d526a9c [ci skip] Fixed bug #75383 (The date is "Sep", it should say "Oct") 2017-10-16 11:11:34 +02:00
Jakub Zelenka 532aec7af2 Merge branch 'PHP-7.2' of git.php.net:php-src into PHP-7.2 2017-10-16 09:54:03 +01:00
Xinchen Hui 8e147f12b9 Fixed bug (Phi sources removel) 2017-10-16 15:01:06 +08:00
Jakub Zelenka a3da46b524 Merge branch 'PHP-7.1' into PHP-7.2 2017-10-15 20:33:22 +01:00
Jakub Zelenka 547fee9cd4 Merge branch 'PHP-7.0' into PHP-7.1 2017-10-15 20:31:25 +01:00
Jakub Zelenka 999fe36d40 Properly fix #75363 and address some other leaks with cert 2017-10-15 20:25:58 +01:00
Jakub Zelenka 7c556c44a1 Fix bug #68567 (JSON_PARTIAL_OUTPUT_ON_ERROR can result in JSON with null key) 2017-10-15 19:36:15 +01:00
Christoph M. Becker 46d87c1f10 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #53070 (enchant_broker_get_path crashes if no path is set)
2017-10-15 14:07:41 +02:00
Christoph M. Becker 5e2751e7ff Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #53070 (enchant_broker_get_path crashes if no path is set)
2017-10-15 14:02:31 +02:00
Jelle van der Waa 5acb8381b2 Fixed bug #53070 (enchant_broker_get_path crashes if no path is set)
enchant_broker_get_dict_path segfaults when the dict path is not setup,
instead of segfaulting return false instead.
2017-10-15 13:57:44 +02:00
Christoph M. Becker de5f15ed4e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75365 (Enchant still reports version 1.1.0)
2017-10-15 13:35:59 +02:00
Christoph M. Becker fd993b1045 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75365 (Enchant still reports version 1.1.0)
2017-10-15 13:30:06 +02:00
Christoph M. Becker fb09021432 Fixed bug #75365 (Enchant still reports version 1.1.0)
Since Enchant is bundled, we make `PHP_ENCHANT_VERSION` an alias of
`PHP_VERSION` and also drop the rather meaningless revision hash from
the PHP info.
2017-10-15 13:19:17 +02:00
Xinchen Hui 481a65a028 Update NEWS 2017-10-15 10:29:40 +08:00
Xinchen Hui 9f5ed133b3 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #75287 (Builtin webserver crash after chdir in a shutdown function)
2017-10-15 10:29:28 +08:00
Xinchen Hui b9b2ae703c Update NEWS 2017-10-15 10:29:10 +08:00
Xinchen Hui 49702ad7fb Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75287 (Builtin webserver crash after chdir in a shutdown function)
2017-10-15 10:28:46 +08:00
Xinchen Hui 816758eda2 Fixed bug #75287 (Builtin webserver crash after chdir in a shutdown function) 2017-10-15 10:28:28 +08:00
Xinchen Hui abbdbc21b0 Fixed bug #75357 (segfault loading WordPress wp-admin) 2017-10-14 23:12:29 +08:00
Dmitry Stogov 7045362ce7 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75368 (mmap/munmap trashing on unlucky allocations)
2017-10-13 14:00:21 +03:00
Dmitry Stogov bf1c1d07db Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75368 (mmap/munmap trashing on unlucky allocations)
2017-10-13 13:56:23 +03:00
Dmitry Stogov 397f5cb687 Fixed bug #75368 (mmap/munmap trashing on unlucky allocations) 2017-10-13 13:56:06 +03:00
Xinchen Hui 21f049b45c Prevent from being affected by local php.ini 2017-10-13 18:23:56 +08:00
Xinchen Hui a52d1088e5 Added skipf 2017-10-13 18:21:41 +08:00
Xinchen Hui e4f7ff9c0f Fixed bug #75370 (Webserver hangs on valid PHP text) 2017-10-13 18:18:10 +08:00
Xinchen Hui e50cc4d3af Fixed typo 2017-10-13 17:35:02 +08:00
Christoph M. Becker 3f8961dfac Fixed bug #75221 (Argon2i always throws NUL at the end)
Apparently, `argon2_encodedlen()` also counts the terminating NUL byte;
that doesn't appear to be documented somewhere, but from looking at the
implementation[1] it is pretty obvious.  Therefore, the respective
`zend_string` has to be one byte shorter.

[1] <https://github.com/P-H-C/phc-winner-argon2/blob/20161029/src/argon2.c#L431-L436>
2017-10-12 12:52:37 +02:00
Bob Weinand ee36507423 Merge branch 'PHP-7.1' into PHP-7.2 2017-10-12 12:32:30 +02:00
Bob Weinand f8ff4c4918 Merge branch 'PHP-7.0' into PHP-7.1 2017-10-12 12:31:20 +02:00
Bob Weinand a55af1e271 Fixed bug #75363 (openssl_x509_parse leaks memory) 2017-10-12 12:30:20 +02:00
Anatol Belski 81473829d4 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  It looks like i should've taken joint response on ext/fileinfo long ago
2017-10-11 22:25:27 +02:00
Anatol Belski 677cd85cb7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  It looks like i should've taken joint response on ext/fileinfo long ago
2017-10-11 22:24:52 +02:00
Anatol Belski 23e97b0222 It looks like i should've taken joint response on ext/fileinfo long ago 2017-10-11 22:21:34 +02:00
Anatol Belski e7aebcc186 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Put php-sdk-2.0.12beta1 for AppVeyor
2017-10-11 20:31:58 +02:00
Anatol Belski f63a0fef6b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Put php-sdk-2.0.12beta1 for AppVeyor
2017-10-11 20:30:40 +02:00
Anatol Belski d432bdb4ab Put php-sdk-2.0.12beta1 for AppVeyor
Quite some tool upgrades there, especially re2c 1.0.2
2017-10-11 20:27:27 +02:00
Anatol Belski 4d61091ac7 [ci skip] update NEWS 2017-10-11 19:02:51 +02:00
Anatol Belski 747f70ba82 Cleanup irrelevant info 2017-10-11 18:40:16 +02:00
Anatol Belski 08d8623dec Upgrade bundled libmagic to 5.31 2017-10-11 18:18:55 +02:00
Christoph M. Becker 1f150fcde1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix Bug #75299 Wrong reflection on inflate_init and inflate_add
2017-10-11 17:30:45 +02:00
Christoph M. Becker d3d23e0cb8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix Bug #75299 Wrong reflection on inflate_init and inflate_add
2017-10-11 17:29:36 +02:00
Christoph M. Becker 787bf7eaf7 Merge branch 'pull-request/2798' into PHP-7.0
* pull-request/2798:
  Fix Bug #75299 Wrong reflection on inflate_init and inflate_add
2017-10-11 17:28:30 +02:00
Christoph M. Becker 50bd4996fd Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Use PHP_VERSION for exif
2017-10-11 14:44:43 +02:00
Christoph M. Becker 62098a10aa Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Use PHP_VERSION for exif
2017-10-11 14:43:51 +02:00
Christoph M. Becker b497b6edf9 Merge branch 'pull-request/2799' into PHP-7.0
* pull-request/2799:
  Use PHP_VERSION for exif
2017-10-11 14:42:46 +02:00
Christoph M. Becker b65e6cfe35 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  bump version
2017-10-11 14:38:12 +02:00
Anatol Belski 53169dc480 Fix datatype 2017-10-11 08:58:59 +02:00
Dmitry Stogov 2929110ce1 Fixed cleanup after optimization passes 2017-10-10 19:25:51 +03:00
Sara Golemon 6c3c18723c Revert "Update NEWS for PHP 7.2.0RC4"
This reverts commit 1ea657c65e.
2017-10-10 11:55:50 -04:00
Sara Golemon 6c8a5817ec Revert "Update NEWS for 7.2.0RC5"
This reverts commit ef25e56ae6.
2017-10-10 11:55:41 -04:00
Sara Golemon ef25e56ae6 Update NEWS for 7.2.0RC5 2017-10-10 15:49:16 +00:00
Sara Golemon 1ea657c65e Update NEWS for PHP 7.2.0RC4 2017-10-10 15:27:31 +00:00
Joe Watkins c2bfdf3712 bump version 2017-10-10 16:12:36 +01:00
Anatol Belski ad279bd180 Fix path in makefile fragment 2017-10-10 14:32:19 +02:00
Christoph M. Becker fcaf183174 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] Add NEWS entry for bug #75349
2017-10-10 13:59:28 +02:00
Christoph M. Becker fee21a45df Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] Add NEWS entry for bug #75349
2017-10-10 13:56:47 +02:00
Christoph M. Becker c8eccf8451 [ci skip] Add NEWS entry for bug #75349 2017-10-10 13:54:52 +02:00
Anatol Belski 9c5a1dad64 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix re2c version detection
2017-10-10 13:00:26 +02:00
Anatol Belski 30f121f9bc Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix re2c version detection
2017-10-10 12:59:14 +02:00
Remi Collet f3cda1a3a5 Update NEWS for 7.2.0RC5 2017-10-10 10:27:37 +00:00
Remi Collet 9317e910fe Update NEWS for PHP 7.2.0RC4 2017-10-10 10:12:30 +00:00
Anatol Belski d1fc9b425f Fix re2c version detection 2017-10-10 10:52:52 +02:00
Anatol Belski 406622d117 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Move dev to 7.0.26
2017-10-10 08:28:09 +02:00
Anatol Belski c8732b1c5f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Move dev to 7.0.26
2017-10-10 08:27:37 +02:00
Anatol Belski 51658bac35 Move dev to 7.0.26 2017-10-10 08:26:04 +02:00
Anatol Belski 611d117b24 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix array access on undeclared properties in DateInterval
2017-10-09 15:38:37 +02:00
Anatol Belski d8881f4eb4 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix array access on undeclared properties in DateInterval
2017-10-09 15:38:21 +02:00
Anatol Belski f48abfa902 Fix array access on undeclared properties in DateInterval 2017-10-09 15:35:38 +02:00
Anatol Belski a51c542b53 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix ftok() multibyte path support
2017-10-09 13:13:51 +02:00
Anatol Belski dc3b9fe619 Fix ftok() multibyte path support 2017-10-09 13:12:40 +02:00
Sara Golemon 1db7e4a962 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Bugfix #74556 stream_socket_get_name() returns null bytes on MacOS
2017-10-07 10:14:03 -04:00
Sara Golemon ac1fd769ad Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Bugfix #74556 stream_socket_get_name() returns null bytes on MacOS
2017-10-07 10:13:54 -04:00
Sara Golemon 843e492c68 Bugfix #74556 stream_socket_get_name() returns null bytes on MacOS 2017-10-07 10:08:34 -04:00
Rasmus Lerdorf ec3ea3081d Add line numbers to Optimizer debug output 2017-10-06 17:18:58 -03:00
Christoph M. Becker d0146c2506 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75318 (The parameter of UConverter::getAliases() is not optional)
2017-10-06 16:57:20 +02:00
Christoph M. Becker 0f55138533 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75318 (The parameter of UConverter::getAliases() is not optional)
2017-10-06 16:46:51 +02:00
Christoph M. Becker ec3d864784 Fixed bug #75318 (The parameter of UConverter::getAliases() is not optional)
Of course, reflection has to know that as well.
2017-10-06 16:45:07 +02:00
Nikita Popov 0e8ccb179d Merge branch 'PHP-7.1' into PHP-7.2 2017-10-05 12:26:19 +02:00
Nikita Popov d34c8fa802 Merge branch 'PHP-7.0' into PHP-7.1 2017-10-05 12:25:37 +02:00
Mathieu CARBONNEAUX 6b9ccda936 Fixed bug #75311 2017-10-05 12:24:57 +02:00
Peter Kokot 74124de048 Use PHP_VERSION for exif 2017-10-04 23:25:36 +02:00
Dmitry Stogov e9426cf816 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed rarely possible use-after-free
2017-10-04 16:39:47 +03:00
Dmitry Stogov b6e34eaf04 Fixed rarely possible use-after-free 2017-10-04 16:38:55 +03:00
Dmitry Stogov c3bb81d5a4 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Bumped ext/oci8 version
  Use dereferenced value
  Fixed compilation errors
  Restored code for BOOL variables
  Fixed few ext/oci8 bugs
2017-10-04 09:59:27 +03:00
Dmitry Stogov c935b832dc Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Bumped ext/oci8 version
  Use dereferenced value
  Fixed compilation errors
  Restored code for BOOL variables
  Fixed few ext/oci8 bugs
2017-10-04 09:58:32 +03:00
Dmitry Stogov 1195de87ff Bumped ext/oci8 version 2017-10-04 09:56:25 +03:00
Dmitry Stogov ee50fcfa27 Merge branch 'oci8_fix' into PHP-7.0
* oci8_fix:
  Use dereferenced value
  Fixed compilation errors
  Restored code for BOOL variables
  Fixed few ext/oci8 bugs
2017-10-04 09:49:40 +03:00
Christoph M. Becker 2b83f0da89 [ci skip] Merge branch 'pull-request/2776' into PHP-7.2
* pull-request/2776:
  Change EXTENSIONS file encoding from iso-8859-1 to utf-8
2017-10-04 00:30:57 +02:00
Dmitry Stogov 24e595bf26 Use dereferenced value 2017-10-03 10:49:56 +03:00
Joe Watkins 6e39258302 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Typo in status.html
2017-10-03 07:22:15 +01:00
Joe Watkins d0cda9d0bd Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Typo in status.html
2017-10-03 07:22:04 +01:00
Viktor Szépe e995b7e475 Typo in status.html
feet needs -> fit needs
2017-10-03 07:21:53 +01:00
Joe Watkins 4c12da6aca Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #74905
2017-10-03 07:19:23 +01:00
Joe Watkins 1322c2c86a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #74905
2017-10-03 07:19:00 +01:00
Peter Kokot 6d1dd8b0af Fix bug #74905 2017-10-03 07:18:38 +01:00
Joe Watkins a87434bda8 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Remove ident gitattribute for ext/zip/php_zip.c
2017-10-03 07:15:14 +01:00
Joe Watkins 2019b25daa Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Remove ident gitattribute for ext/zip/php_zip.c
2017-10-03 07:15:02 +01:00
Peter Kokot 7b248a1b32 Remove ident gitattribute for ext/zip/php_zip.c 2017-10-03 07:14:50 +01:00
Dmitry Stogov 4d69587035 Fixed compilation errors 2017-10-03 09:08:28 +03:00
Remi Collet ca6d701994 NEWS 2017-10-03 06:42:39 +02:00
Remi Collet d67873ec99 Fix Bug #75284 sha3 is not supported on bigendian machine 2017-10-03 06:41:46 +02:00
Frank Denis a1c0824518 NEWS 2017-10-02 22:47:06 +02:00
Frank Denis 9d236d63f9 ext/sodium: untab tests 2017-10-02 22:28:46 +02:00
Frank Denis 1dc47286d1 ext/sodium: import secretstream test 2017-10-02 22:28:33 +02:00
Frank Denis 6de12a5f1e ext/sodium: sodium_compare() is always available 2017-10-02 22:23:53 +02:00
Frank Denis 40ab4c9d4e ext/sodium: fix funky indentation 2017-10-02 22:22:22 +02:00
Frank Denis 7fc396c15d ext/sodium: move pwhash_scrypt() after pwhash() 2017-10-02 22:19:55 +02:00
Frank Denis 986a9e879a ext/sodium: checks for crypto_box_SEALBYTES are not required 2017-10-02 22:11:29 +02:00
Frank Denis 4d1707b764 ext/sodium: explicitly include <string.h> 2017-10-02 22:10:30 +02:00
Frank Denis 0726d0be9f ext/sodium: zend_parse_parameters -> zend_parse_parameters_throw 2017-10-02 22:05:59 +02:00
Frank Denis e4917d141a ext/sodium: fix funky indent on zend_parse_parameters_throw() calls 2017-10-02 22:02:47 +02:00
Frank Denis 72f7d0b184 ext/sodium: import bindings for secretstream 2017-10-02 21:59:51 +02:00
Frank Denis 7d53e65125 ext/sodium: add crypto_pwhash_str_needs_rehash()
Also properly define xchacha20poly1305_ietf_keygen()
2017-10-02 21:54:50 +02:00
Frank Denis e22094eb13 ext/sodium: +base64 codecs (timing-safe) 2017-10-02 21:43:54 +02:00
Frank Denis ad120c5ae9 ext/sodium: add arginfo definitions that will be required later
Don't check for existence of aesgcm symbols, since we only support
libsodium >= 1.0.8
2017-10-02 21:40:38 +02:00
Frank Denis 519ca1d53b ext/sodium: sort prototypes 2017-10-02 21:36:35 +02:00
Dmitry Stogov c8dea7ae1e Restored code for BOOL variables 2017-10-02 17:04:26 +03:00
Remi Collet 2606c5f0fe Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  NEWS
  Fixed bug #75303 sha3 hangs on bigendian
2017-10-02 11:26:46 +02:00
Remi Collet 03aef5f65c NEWS 2017-10-02 11:26:08 +02:00
Remi Collet fa78afa112 Fixed bug #75303 sha3 hangs on bigendian 2017-10-02 11:25:23 +02:00
Sara Golemon ec90310ea9 Guard against AI_NUMERICSERV not being defined. 2017-10-01 21:37:04 -04:00
Frank Denis 0663ca135d ext/sodium: fix pwhash_argon2i test 2017-10-01 16:00:41 +02:00
Fabien Villepinte 9d9873b3b5 Fix Bug #75299 Wrong reflection on inflate_init and inflate_add 2017-10-01 11:27:16 +02:00
Xinchen Hui 92ceb64faf Merge branch 'patch-compile-warning' of https://github.com/petk/php-src into PHP-7.2
* 'patch-compile-warning' of https://github.com/petk/php-src:
  Fix bug #75279
2017-09-30 12:14:21 +08:00
Andrea Faulds 15efa985df Merge branch 'PHP-7.1' into PHP-7.2 2017-09-29 21:38:52 +01:00
Andrea Faulds 4372293192 Merge branch 'PHP-7.0' into PHP-7.1 2017-09-29 21:38:30 +01:00
Andrea Faulds abefb6dfe7 Fix bug #75290 2017-09-29 21:38:08 +01:00
Remi Collet 7e21f472c6 NEWS 2017-09-29 15:50:38 +02:00
Remi Collet 7c8357929c Fixed bug #75285i Broken build when system libpcre don't have jit support
Detect JIT support in system library,
So --with-pcre-jit is only for bundled library.
2017-09-29 15:47:50 +02:00
Peter Kokot 8d87f6f6dd Fix bug #75279 2017-09-29 14:33:54 +02:00
Anatol Belski c3a1cc382a Revert --with-pcre-valgrind by default in debug build
After quite a few people reported this option enabled to be in many cases
not handy by default, it's reverted to no by default everywhere. If enabled,
it requires Valgrind dev packages, where just a few have Valgrind itself
installed or care. Still for PCRE related work this option is a must,
though will have to be turned on by hand.

Revert "fix default args for --with-pcre-valgrind"

This reverts commit 24de0fe9f4.

Revert "Enable valgrind support for PCRE by default in debug builds"

This reverts commit 850bb998d9.
2017-09-29 12:17:38 +02:00
Xinchen Hui d3aa65231e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75267 (possible &/&& mixup)
2017-09-29 11:17:07 +08:00
Xinchen Hui 9fd33c1f20 Fixed bug #75267 (possible &/&& mixup) 2017-09-29 11:16:32 +08:00
Sara Golemon a93fe32c1a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix word alignment on ILP64.
2017-09-28 10:48:43 -04:00
Sara Golemon b5bc88c64e Fix word alignment on ILP64. 2017-09-28 10:45:51 -04:00
Anatol Belski 4f1ea03528 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Apply upstream patch for CVE-2016-1283
2017-09-28 15:45:09 +02:00
Anatol Belski db9778dfb2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Apply upstream patch for CVE-2016-1283
2017-09-28 15:44:40 +02:00
Anatol Belski d11fceab15 Apply upstream patch for CVE-2016-1283
Fix bug #75207, see also
https://bugzilla.redhat.com/show_bug.cgi?id=1295385
https://vcs.pcre.org/pcre?view=revision&revision=1636
2017-09-28 15:40:49 +02:00
Anatol Belski 4f63024206 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix mkdir() special case for path length < 260 and > 248
2017-09-28 13:19:48 +02:00
Anatol Belski 72c008f945 Fix mkdir() special case for path length < 260 and > 248 2017-09-28 13:18:31 +02:00
Christoph M. Becker b0d6d27349 [ci skip] hash_hmac_algos() is new in PHP 7.2.0 2017-09-27 17:18:10 +02:00
Dmitry Stogov 978c6c4e31 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75255 (Request hangs and not finish)
2017-09-27 17:17:46 +03:00
Dmitry Stogov 1c68d63f35 Fixed bug #75255 (Request hangs and not finish) 2017-09-27 17:16:24 +03:00
jhdxr 7deb561f75 fix bug #75222 DateInterval microseconds property always 0 2017-09-27 06:23:42 +01:00
Joe Watkins b0950ff854 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix CGI m4 config message when CGI is disabled
2017-09-27 06:20:46 +01:00
Joe Watkins 1981c48e60 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix CGI m4 config message when CGI is disabled
2017-09-27 06:20:34 +01:00
Peter Kokot 29e673f8ed Fix CGI m4 config message when CGI is disabled 2017-09-27 06:20:09 +01:00
Joe Watkins 474ee702ab Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #75248 and #75251
2017-09-27 06:16:13 +01:00
Joe Watkins af71942da2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #75248 and #75251
2017-09-27 06:15:47 +01:00
Peter Kokot 6d0391b1a4 Fix bug #75248 and #75251 2017-09-27 06:15:12 +01:00
Joe Watkins 0d6c56a8ea Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed #75220 - Segfault when calling is_callable on parent
2017-09-27 06:08:49 +01:00
Joe Watkins 2dd77456fe Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #75220 - Segfault when calling is_callable on parent
2017-09-27 06:08:01 +01:00
Nester a680d701ce Fixed #75220 - Segfault when calling is_callable on parent 2017-09-27 06:07:24 +01:00
Frank Denis 33b4405d84 ext/sodium: call crypto_pwhash_argon2id() explicitly if required 2017-09-26 18:09:00 +02:00
Frank Denis 47d75394c9 ext/sodium: avoid tautological comparisons 2017-09-26 17:58:16 +02:00
Frank Denis f64d00d684 ext/sodium: signing empty messages is fine 2017-09-26 17:37:04 +02:00
Remi Collet bffe657d94 Update NEWS for 7.2.0RC4 2017-09-26 09:38:23 +00:00
Remi Collet 8cdb9784d2 Update NEWS for PHP 7.2.0RC3 2017-09-26 09:23:07 +00:00
Nikita Popov 3a4db74ee4 Create $http_response_header even if not used
Extensions are relying on it.
2017-09-26 09:20:43 +02:00
Christoph M. Becker 296eb5193c Merge branch 'pull-request/2773' into PHP-7.2
* pull-request/2773:
  Fix PHP_GD_TTSTR: command not found warning in ext/gd
2017-09-26 00:45:21 +02:00
Anatol Belski 8466ef9096 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Remove some old sapi/apache_hooks and sapi/apache leftovers
2017-09-25 21:58:41 +02:00
Anatol Belski 0217a81722 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Remove some old sapi/apache_hooks and sapi/apache leftovers
2017-09-25 21:58:18 +02:00
Peter Kokot e095e6db63 Change EXTENSIONS file encoding from iso-8859-1 to utf-8
Also fix some characters to their correct letters.
2017-09-25 21:57:24 +02:00
Peter Kokot 3752d18ffe Remove some old sapi/apache_hooks and sapi/apache leftovers 2017-09-25 21:56:39 +02:00
Dmitry Stogov 2a33e357cd Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Added missed ~
2017-09-25 12:23:01 +03:00
Dmitry Stogov 550595c085 Added missed ~ 2017-09-25 12:22:35 +03:00
Dmitry Stogov 801cdb8945 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed type inference
2017-09-25 12:04:13 +03:00
Dmitry Stogov d526ddec85 Fixed type inference 2017-09-25 12:03:47 +03:00
Peter Kokot 8c85d7b732 Fix PHP_GD_TTSTR: command not found warning in ext/gd 2017-09-25 02:37:42 +02:00
Xinchen Hui ed2a5ebaeb Fixed bug #75230 (Invalid opcode 49/1/8 using opcache) 2017-09-24 18:01:29 +08:00
Xinchen Hui ccc0a92504 Update NEWS 2017-09-24 17:25:11 +08:00
Xinchen Hui bad5639386 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #75241 (Null pointer dereference in zend_mm_alloc_small()).
  Compiler warning
2017-09-24 17:24:57 +08:00
Xinchen Hui 634f79d8d8 Update NEWS 2017-09-24 17:24:43 +08:00
Xinchen Hui e8c200515a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75241 (Null pointer dereference in zend_mm_alloc_small()).
  Compiler warning
2017-09-24 17:24:23 +08:00
Xinchen Hui b05ff14a9a Fixed bug #75241 (Null pointer dereference in zend_mm_alloc_small()). 2017-09-24 17:24:11 +08:00
Xinchen Hui db63367871 Compiler warning 2017-09-24 17:19:05 +08:00
Nikita Popov 76b2b4a190 Merge branch 'PHP-7.1' into PHP-7.2 2017-09-24 08:55:12 +02:00
Nikita Popov 628c257f71 Merge branch 'PHP-7.0' into PHP-7.1 2017-09-24 08:54:36 +02:00
Nikita Popov 73d6456d7d Fixed bug #75252 2017-09-24 08:53:27 +02:00
Dmitry Stogov 28391b9e7f Using "enum" types as bit-fields is not portable. 2017-09-22 13:35:41 +03:00
Frank Denis 8a52a61e3a ext/sodium: avoid negations on unsigned values 2017-09-21 17:46:01 +02:00
Anatol Belski 95870dcc77 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix thread safety
2017-09-21 10:33:13 +02:00
Anatol Belski 96323d1bd7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix thread safety
2017-09-21 10:32:47 +02:00
Anatol Belski da2f581833 Fix thread safety 2017-09-21 10:32:09 +02:00
Andrea Faulds 7418f6814f Merge branch 'PHP-7.1' into PHP-7.2 2017-09-21 00:04:56 +01:00
Andrea Faulds b71023e297 Merge branch 'PHP-7.0' into PHP-7.1 2017-09-21 00:04:08 +01:00
Andrea Faulds 418f97443a Fix bug #75236 2017-09-21 00:02:52 +01:00
Jannes Jeising c7a0177491 [ci skip] Fix more typos in UPGRADING 2017-09-20 15:50:06 -04:00
Christoph M. Becker 43152bc39f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #73629 (SplDoublyLinkedList::setIteratorMode masks intern flags)
2017-09-20 15:54:07 +02:00
Christoph M. Becker 0c0b955d5f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73629 (SplDoublyLinkedList::setIteratorMode masks intern flags)
2017-09-20 15:47:02 +02:00
Dmitry Stogov 9a01fe712a Fixed few ext/oci8 bugs 2017-09-20 16:46:04 +03:00
Christoph M. Becker eedc060c92 Fixed bug #73629 (SplDoublyLinkedList::setIteratorMode masks intern flags)
We must not overwrite the SPL_DLLIST_IT_FIX flag when changing the
iterator mode.
2017-09-20 15:46:04 +02:00
Dmitry Stogov 6544ec5460 Fixed NOP removal (empty blocks should be shifted as well) 2017-09-20 01:10:31 +03:00
Frank Denis fd86fdd7b8 ext/sodium: throw an exception if only the prefix of a hex string is valid 2017-09-19 14:37:21 +02:00
Remi Collet ee84f34344 rename test 2017-09-19 07:26:53 +02:00
Christoph M. Becker 3cd5f28899 [ci skip] Update NEWS 2017-09-18 22:52:18 +02:00
Dmitry Stogov 5ef10d08ec Use private names for new libpcre symbols. 2017-09-18 20:00:45 +03:00
Remi Collet 7d5c0f1906 NEWS 2017-09-18 18:09:35 +02:00
Remi Collet cfc6c4d297 Fixed Bug #75212 php_value acts like php_admin_value 2017-09-18 18:08:51 +02:00
Dmitry Stogov 084e34098a Fixed optimization (the bug caused endless-loop on micro_bench.php in master branch) 2017-09-18 14:10:18 +03:00
Anatol Belski d8f1afb45e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix the version check causing the test fail
2017-09-18 12:06:54 +02:00
Anatol Belski 5c59dd0047 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix the version check causing the test fail
2017-09-18 12:06:23 +02:00
Anatol Belski 9641586efa Fix the version check causing the test fail 2017-09-18 12:04:31 +02:00
Dmitry Stogov 41e5f916bf Fixed bug #74878 (Data race in ZTS builds) 2017-09-18 11:27:10 +03:00
Anatol Belski de2f28ede1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update lib_versions.txt
2017-09-18 09:37:46 +02:00
Anatol Belski e3e3d37fa9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Update lib_versions.txt
2017-09-18 09:36:29 +02:00
Anatol Belski 7670590efd Update lib_versions.txt 2017-09-18 09:34:58 +02:00
Anatol Belski 9551818649 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Move to next binary SDK version for AppVeyor
2017-09-15 23:06:19 +02:00
Anatol Belski 351f98f5f3 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Move to next binary SDK version for AppVeyor
2017-09-15 23:05:25 +02:00
Anatol Belski 7910c1dee9 Move to next binary SDK version for AppVeyor 2017-09-15 23:04:15 +02:00
Christoph M. Becker b5052f0110 [ci skip] Fix typos in UPGRADING 2017-09-14 00:34:26 +02:00
Anatol Belski 46e0c474e0 [ci skip] update NEWS 2017-09-13 15:47:52 +02:00
Anatol Belski 66c7c28dbf Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] update NEWS
2017-09-13 15:47:19 +02:00
Anatol Belski fba792945e [ci skip] update NEWS
Fix format
2017-09-13 15:46:33 +02:00
Anatol Belski b134793b32 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75018, fixed bug #75177
2017-09-13 14:12:31 +02:00
Anatol Belski 3d93856c4a Fixed bug #75018, fixed bug #75177
Both are caused by the same cast issue in mysqlnd on 32-bit.
2017-09-13 14:10:30 +02:00
Remi Collet d99cd28925 fix tests for 32-bit 2017-09-13 12:20:05 +02:00
Dmitry Stogov 168ec3a6e1 Fixed ZTS build (disable deallocation of arg_info of internal functions with type hints) 2017-09-13 10:10:56 +03:00
Dmitry Stogov a84608d4e2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Properly update string type flags
2017-09-13 01:46:23 +03:00
Dmitry Stogov c24b3eff11 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Properly update string type flags
2017-09-13 01:46:12 +03:00
Dmitry Stogov d7a10f0e32 Properly update string type flags 2017-09-13 01:45:57 +03:00
Dmitry Stogov 10a7f2cf62 Fixed memry leaks (free arg_info of internal functions with type hints) 2017-09-13 01:44:19 +03:00
Dmitry Stogov 40d15cb03d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Revert "Properly update string type flags"
2017-09-13 00:15:20 +03:00
Dmitry Stogov 5f1d553e7e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Revert "Properly update string type flags"
2017-09-13 00:15:08 +03:00
Dmitry Stogov 83d8ebc991 Revert "Properly update string type flags"
This reverts commit 99b1a62d55.
2017-09-13 00:14:39 +03:00
Dmitry Stogov c2cf132ecd Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed test
2017-09-12 23:47:52 +03:00
Dmitry Stogov 253d49369d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed test
2017-09-12 23:47:39 +03:00
Dmitry Stogov 2874fa8fb0 Fixed test 2017-09-12 23:47:22 +03:00
Dmitry Stogov 73430d5362 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Properly update string type flags
2017-09-12 23:43:56 +03:00
Dmitry Stogov 7452fd0263 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Properly update string type flags
2017-09-12 23:43:42 +03:00
Dmitry Stogov 99b1a62d55 Properly update string type flags 2017-09-12 23:42:51 +03:00
Sara Golemon 0d37dcd21d Update NEWS for 7.2.0RC3 2017-09-12 12:47:55 -04:00
Sara Golemon 2272f408ed Update NEWS for PHP 7.2.0RC2 2017-09-12 12:47:55 -04:00
Anatol Belski 689f9956da Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix test failure on 32-bit
2017-09-12 18:19:34 +02:00
Anatol Belski fcad6a97b8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix test failure on 32-bit
2017-09-12 18:18:44 +02:00
Anatol Belski 7674b5e574 Fix test failure on 32-bit 2017-09-12 18:17:28 +02:00
Anatol Belski 7c5e454b09 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  bump versions
2017-09-12 18:11:05 +02:00
Joe Watkins 7f01872a24 bump versions 2017-09-12 15:34:30 +01:00
248 changed files with 144436 additions and 130979 deletions

No files matched your search

+1 -2
View File
@@ -18,13 +18,12 @@ clone_depth: 64
cache:
- c:\build-cache
- c:\build-cache\sdk -> .appveyor.yml
environment:
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
PHP_BUILD_OBJ_DIR: c:\obj
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.10
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.12
PHP_BUILD_CRT: vc15
# ext and env setup for tests
#MYSQL_TEST_PASSWD: Password12!
+25 -6
View File
@@ -1,16 +1,35 @@
; http://editorconfig.org/
# http://editorconfig.org/
root = true
[*.{c,h}]
charset = UTF-8
end_of_line = LF
[*.{c,h,awk,w32,bat,mk,frag}]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = tab
insert_final_newline = true
tab_width = 4
trim_trailing_whitespace = true
insert_final_newline = true
[*.yml]
[*.{php,phpt}]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
[*.{yml,m4,sh}]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
charset = utf-8
end_of_line = lf
indent_style = space
trim_trailing_whitespace = false
insert_final_newline = true
-4
View File
@@ -15,11 +15,8 @@ ext/dba/libflatfile/flatfile.c ident
ext/dba/libcdb/cdb_make.c ident
ext/dba/libcdb/cdb.c ident
ext/filter/filter.c ident
ext/zip/php_zip.c ident
README.input_filter ident
run-tests.php ident
sapi/nsapi/nsapi.c ident
sapi/continuity/capi.c ident
Zend/RFCs/002.txt ident
Zend/RFCs/003.txt ident
ext/exif/exif.c ident
@@ -32,7 +29,6 @@ UPGRADING.INTERNALS merge=NEWS
/ext/bz2/tests/with_strings.phpt -crlf
/ext/dom/tests/bug40836.phpt -crlf
/ext/dom/tests/domelement.phpt -crlf
/ext/ereg/tests/eregi_basic_002.phpt -crlf
/ext/iconv/tests/iconv004.phpt -crlf
/ext/iconv/tests/iconv_basic.phpt -crlf
/ext/iconv/tests/iconv_strpos.phpt -crlf
-2
View File
@@ -179,9 +179,7 @@ pear/phpize
pear/run-tests
pear/php-config
pear/scripts
sapi/apache/libphp7.module
sapi/apache2handler/libphp7.module
sapi/apache_hooks/libphp7.module
sapi/cgi/php-cgi
sapi/cgi/php-cgi.1
sapi/cli/php.1
+1
View File
@@ -1,3 +1,4 @@
dist: trusty
language: c
sudo: false
addons:
+17 -17
View File
@@ -37,7 +37,7 @@ MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: cli
MAINTENANCE: Marcus Boerger <helly@php.net>, Edin Kadribasic <edink@php.net>
MAINTENANCE: Marcus Börger <helly@php.net>, Edin Kadribasic <edink@php.net>
STATUS: Working
SINCE: 4.3.0
-------------------------------------------------------------------------------
@@ -68,7 +68,7 @@ STATUS: 5.6
-------------------------------------------------------------------------------
EXTENSION: dba
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>,Christopher Jones <sixd@php.net>, Pierre-Alain Joye <pajoye@php.net>
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>,Christopher Jones <sixd@php.net>, Pierre-Alain Joye <pajoye@php.net>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: DBM abstraction for db2, db3, db4, dbm, ndbm, gdbm, ini
@@ -79,13 +79,13 @@ MAINTENANCE: Odd fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mysqli
PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 5.0
-------------------------------------------------------------------------------
EXTENSION: mysqlnd
PRIMARY MAINTAINER: Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
PRIMARY MAINTAINER: Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 5.3
@@ -99,7 +99,7 @@ EXTENSION: odbc
PRIMARY MAINTAINER: Daniel R. Kalowsky <kalowsky@php.net>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Working
COMMENT: Working
-------------------------------------------------------------------------------
EXTENSION: pdo
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>, Wez Furlong <wez@php.net>
@@ -120,7 +120,7 @@ STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pdo_mysql
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>, Johannes Schlüter <johannes@php.net>, Andrey Hristov <andrey@php.net>, Ulf Wendel <uw@php.net>
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>, Johannes Schlüter <johannes@php.net>, Andrey Hristov <andrey@php.net>, Ulf Wendel <uw@php.net>
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
@@ -150,7 +150,7 @@ STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pgsql
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Yasuo Ohgaki <yohgaki@php.net>
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>, Yasuo Ohgaki <yohgaki@php.net>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Use PostgreSQL 7.0.x or later. PostgreSQL 6.5.3 or less have fatal bug.
@@ -168,13 +168,13 @@ COMMENT: Integrates SQLite 3 embeddable SQL database engine.
-------------------------------------------------------------------------------
EXTENSION: dom
PRIMARY MAINTAINER: Christian Stocker <chregu@php.net>, Rob Richards <rrichards@php.net>, Marcus Boerger <helly@php.net>
PRIMARY MAINTAINER: Christian Stocker <chregu@php.net>, Rob Richards <rrichards@php.net>, Marcus Börger <helly@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 5.0
-------------------------------------------------------------------------------
EXTENSION: simplexml
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 5.0
@@ -195,12 +195,12 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: libxml
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Christian Stocker <chregu@php.net>
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Christian Stocker <chregu@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xmlreader
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Christian Stocker <chregu@php.net>
PRIMARY MAINTAINER: Rob Richards <rrichards@php.net>, Christian Stocker <chregu@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -335,7 +335,7 @@ STATUS: Working
SINCE: 5.2
-------------------------------------------------------------------------------
EXTENSION: ldap
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>, Douglas Goldstein <cardoe@php.net>, Pierre-Alain Joye <pajoye@php.net>, Côme Bernigaud <mcmic@php.net>
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>, Douglas Goldstein <cardoe@php.net>, Pierre-Alain Joye <pajoye@php.net>, Côme Bernigaud <mcmic@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -367,13 +367,13 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: phar
PRIMARY MAINTAINER: Greg Beaver <cellog@php.net>, Marcus Börger <helly@php.net>, Steph Fox <sfox@php.net>
PRIMARY MAINTAINER: Greg Beaver <cellog@php.net>, Marcus Börger <helly@php.net>, Steph Fox <sfox@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 5.3
-------------------------------------------------------------------------------
EXTENSION: posix
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -388,12 +388,12 @@ MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: recode
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: reflection
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>, Johannes Schlüter <johannes@php.net>
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>, Johannes Schlüter <johannes@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -426,7 +426,7 @@ STATUS: Working
SINCE: 7.2.0
-------------------------------------------------------------------------------
EXTENSION: spl
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Etienne Kneuss <colder@php.net>
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>, Etienne Kneuss <colder@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 5.0.0
+4 -4
View File
@@ -5,7 +5,7 @@ INSTALL_DATA = $(INSTALL) -m 644
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
all: $(all_targets)
all: $(all_targets)
@echo
@echo "Build complete."
@echo "Don't forget to run 'make test'."
@@ -112,13 +112,13 @@ test: all
clean:
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
distclean: clean
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module sapi/apache_hooks/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
rm -f php7.spec main/build-defs.h scripts/phpize
rm -f ext/date/lib/timelib_config.h ext/mbstring/oniguruma/config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak
rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 ext/phar/phar.1 ext/phar/phar.phar.1
@@ -135,7 +135,7 @@ prof-gen:
prof-clean:
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
+1676 -431
View File
File diff suppressed because it is too large. Load diff
+10 -4
View File
@@ -24,7 +24,7 @@ PHP 7.2 UPGRADE NOTES
closed resources.
. is_object() will now return true for objects of class
__PHP_Incomplete_Class.
. Support for Netware operating systems have been removed.
. Support for Netware operating systems has been removed.
. Casting arrays to objects (with (object) or settype()) will now convert
integer keys to string property names. This fixes the behaviour of previous
versions, where integer keys would become inaccessible properties with
@@ -182,7 +182,7 @@ PHP 8.0.
it does not trigger a deprecation warning for technical reasons.
- EXIF:
. The read_exif_data() alias have been deprecated, use exif_read_data() instead.
. The read_exif_data() alias has been deprecated, use exif_read_data() instead.
- GD:
. png2wbmp() and jpeg2wbmp() have been deprecated.
@@ -253,9 +253,12 @@ See also: https://wiki.php.net/rfc/deprecations_php_7_2
. Added imageresolution().
. Added imagecreatefrombmp() and imagebmp().
- Hash:
. Added hash_hmac_algos().
- Mbstring:
. Added mb_chr() and mb_ord().
. Added mb_scurb() that scrub broken multibyte strings.
. Added mb_scrub() that scrubs broken multibyte strings.
- OCI8:
. Added oci_register_taf_callback() and oci_disable_taf_callback() for
@@ -265,6 +268,9 @@ See also: https://wiki.php.net/rfc/deprecations_php_7_2
. Added socket_addrinfo_lookup(), socket_addrinfo_connect(),
socket_addrinfo_bind() and socket_addrinfo_explain().
- SPL:
. Added spl_object_id().
========================================
7. New Classes and Interfaces
========================================
@@ -345,7 +351,7 @@ See also: https://wiki.php.net/rfc/deprecations_php_7_2
========================================
- sql.safe_mode
. This INI directive have been removed.
. This INI directive has been removed.
- realpath_cache_size
. Set to 4096k by default
+13
View File
@@ -0,0 +1,13 @@
--TEST--
Bug #75241 (Null pointer dereference in zend_mm_alloc_small())
--FILE--
<?php
function eh(){}
set_error_handler('eh');
$d->d = &$d + $d->d/=0;
var_dump($d);
?>
--EXPECT--
float(INF)
+28
View File
@@ -0,0 +1,28 @@
--TEST--
Bug #75252: Incorrect token formatting on two parse errors in one request
--FILE--
<?php
$code = <<<'CODE'
function test_missing_semicolon() : string {
$x = []
FOO
}
CODE;
try {
eval($code);
} catch (ParseError $e) {
var_dump($e->getMessage());
}
try {
eval($code);
} catch (ParseError $e) {
var_dump($e->getMessage());
}
?>
--EXPECT--
string(41) "syntax error, unexpected 'FOO' (T_STRING)"
string(41) "syntax error, unexpected 'FOO' (T_STRING)"
+26
View File
@@ -0,0 +1,26 @@
--TEST--
Bug #75290 (debug info of Closures of internal functions contain garbage argument names)
--FILE--
<?php
var_dump((new ReflectionFunction('sin'))->getClosure());
var_dump(function ($someThing) {});
?>
--EXPECT--
object(Closure)#2 (1) {
["parameter"]=>
array(1) {
["$number"]=>
string(10) "<required>"
}
}
object(Closure)#2 (1) {
["parameter"]=>
array(1) {
["$someThing"]=>
string(10) "<required>"
}
}
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug #75420.1 (Indirect modification of magic method argument)
--FILE--
<?php
class Test {
public function __isset($x) { $GLOBALS["name"] = 24; return true; }
public function __get($x) { var_dump($x); return 42; }
}
$obj = new Test;
$name = "foo";
var_dump($obj->$name ?? 12);
var_dump($name);
?>
--EXPECT--
string(3) "foo"
int(42)
int(24)
+21
View File
@@ -0,0 +1,21 @@
--TEST--
Bug #75420.10 (Indirect modification of magic method argument)
--FILE--
<?php
class Test implements ArrayAccess {
public function offsetExists($x) { $GLOBALS["name"] = 24; return true; }
public function offsetGet($x) { var_dump($x); return 42; }
public function offsetSet($x, $y) { }
public function offsetUnset($x) { }
}
$obj = new Test;
$name = "foo";
$name = str_repeat($name, 2);
var_dump($obj[$name] ?? 12);
var_dump($name);
?>
--EXPECT--
string(6) "foofoo"
int(42)
int(24)
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #75420.11 (Indirect modification of magic method argument)
--FILE--
<?php
class Test implements ArrayAccess {
public function offsetExists($x) { $GLOBALS["name"] = 24; return true; }
public function offsetGet($x) { var_dump($x); return 42; }
public function offsetSet($x, $y) { }
public function offsetUnset($x) { }
}
$obj = new Test;
$name = "foo";
var_dump(empty($obj[$name]));
var_dump($name);
?>
--EXPECT--
string(3) "foo"
bool(false)
int(24)
+21
View File
@@ -0,0 +1,21 @@
--TEST--
Bug #75420.12 (Indirect modification of magic method argument)
--FILE--
<?php
class Test implements ArrayAccess {
public function offsetExists($x) { $GLOBALS["name"] = 24; return true; }
public function offsetGet($x) { var_dump($x); return 42; }
public function offsetSet($x, $y) { }
public function offsetUnset($x) { }
}
$obj = new Test;
$name = "foo";
$name = str_repeat($name, 2);
var_dump(empty($obj[$name]));
var_dump($name);
?>
--EXPECT--
string(6) "foofoo"
bool(false)
int(24)
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #75420.13 (Indirect modification of magic method argument)
--FILE--
<?php
class Test implements ArrayAccess {
public function offsetExists($x) { $GLOBALS["obj"] = 24; return true; }
public function offsetGet($x) { var_dump($x); return 42; }
public function offsetSet($x, $y) { }
public function offsetUnset($x) { }
}
$obj = new Test;
$name = "foo";
var_dump($obj[$name] ?? 12);
var_dump($obj);
?>
--EXPECT--
string(3) "foo"
int(42)
int(24)
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #75420.14 (Indirect modification of magic method argument)
--FILE--
<?php
class Test implements ArrayAccess {
public function offsetExists($x) { $GLOBALS["obj"] = 24; return true; }
public function offsetGet($x) { var_dump($x); return 42; }
public function offsetSet($x, $y) { }
public function offsetUnset($x) { }
}
$obj = new Test;
$name = "foo";
var_dump(empty($obj[$name]));
var_dump($obj);
?>
--EXPECT--
string(3) "foo"
bool(false)
int(24)
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #75420.15 (Indirect modification of magic method argument)
--FILE--
<?php
class Test implements ArrayAccess {
public function offsetExists($x) { }
public function offsetGet($x) { }
public function offsetSet($x, $y) { $GLOBALS["name"] = 24; var_dump($x); }
public function offsetUnset($x) { }
}
$obj = new Test;
$name = "foo";
$name = str_repeat($name, 2);
$obj[$name] = 1;
var_dump($name);
?>
--EXPECT--
string(6) "foofoo"
int(24)
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #75420.16 (Indirect modification of magic method argument)
--FILE--
<?php
class Test implements ArrayAccess {
public function offsetExists($x) { }
public function offsetGet($x) { }
public function offsetSet($x, $y) { $GLOBALS["obj"] = 24; var_dump($this); }
public function offsetUnset($x) { }
}
$obj = new Test;
$name = "foo";
$obj[$name] = 1;
var_dump($obj);
?>
--EXPECT--
object(Test)#1 (0) {
}
int(24)
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #75420.2 (Indirect modification of magic method argument)
--FILE--
<?php
class Test {
public function __isset($x) { $GLOBALS["name"] = 24; return true; }
public function __get($x) { var_dump($x); return 42; }
}
$obj = new Test;
$name = "foo";
$name = str_repeat($name, 2);
var_dump($obj->$name ?? 12);
var_dump($name);
?>
--EXPECT--
string(6) "foofoo"
int(42)
int(24)
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug #75420.3 (Indirect modification of magic method argument)
--FILE--
<?php
class Test {
public function __isset($x) { $GLOBALS["name"] = 24; return true; }
public function __get($x) { var_dump($x); return 42; }
}
$obj = new Test;
$name = "foo";
var_dump(empty($obj->$name));
var_dump($name);
?>
--EXPECT--
string(3) "foo"
bool(false)
int(24)
+17
View File
@@ -0,0 +1,17 @@
--TEST--
Bug #75420.4 (Indirect modification of magic method argument)
--FILE--
<?php
class Test {
public function __isset($x) { $GLOBALS["name"] = 24; return true; }
public function __get($x) { var_dump($x); return 42; }
}
$obj = new Test;
$name = "foo";
$name = str_repeat($name, 2);
var_dump(empty($obj->$name));
?>
--EXPECT--
string(6) "foofoo"
bool(false)
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #75420.5 (Indirect modification of magic method argument)
--FILE--
<?php
class Test {
public function __isset($x) { $GLOBALS["obj"] = 24; return true; }
public function __get($x) { var_dump($this); return 42; }
}
$obj = new Test;
$name = "foo";
var_dump($obj->$name ?? 12);
var_dump($obj);
?>
--EXPECT--
object(Test)#1 (0) {
}
int(42)
int(24)
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #75420.6 (Indirect modification of magic method argument)
--FILE--
<?php
class Test {
public function __isset($x) { $GLOBALS["obj"] = 24; return true; }
public function __get($x) { var_dump($this); return 42; }
}
$obj = new Test;
$name = "foo";
var_dump(empty($obj->$name));
var_dump($obj);
?>
--EXPECT--
object(Test)#1 (0) {
}
bool(false)
int(24)
+17
View File
@@ -0,0 +1,17 @@
--TEST--
Bug #75420.7 (Indirect modification of magic method argument)
--FILE--
<?php
class Test {
public function __set($x,$v) { $GLOBALS["name"] = 24; var_dump($x); }
}
$obj = new Test;
$name = "foo";
$name = str_repeat($name, 2);
$obj->$name = 1;
var_dump($name);
?>
--EXPECT--
string(6) "foofoo"
int(24)
+17
View File
@@ -0,0 +1,17 @@
--TEST--
Bug #75420.8 (Indirect modification of magic method argument)
--FILE--
<?php
class Test {
public function __set($x,$v) { $GLOBALS["obj"] = 24; var_dump($this); }
}
$obj = new Test;
$name = "foo";
$obj->$name = 1;
var_dump($obj);
?>
--EXPECT--
object(Test)#1 (0) {
}
int(24)
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #75420.9 (Indirect modification of magic method argument)
--FILE--
<?php
class Test implements ArrayAccess {
public function offsetExists($x) { $GLOBALS["name"] = 24; return true; }
public function offsetGet($x) { var_dump($x); return 42; }
public function offsetSet($x, $y) { }
public function offsetUnset($x) { }
}
$obj = new Test;
$name = "foo";
var_dump($obj[$name] ?? 12);
var_dump($name);
?>
--EXPECT--
string(3) "foo"
int(42)
int(24)
+17
View File
@@ -0,0 +1,17 @@
--TEST--
Bug #75420 (Crash when modifing property name in __isset for BP_VAR_IS)
--FILE--
<?php
class Test {
public function __isset($x) { $GLOBALS["name"] = 24; return true; }
public function __get($x) { var_dump($x); return 42; }
}
$obj = new Test;
$name = "foo";
var_dump($obj->$name ?? 12);
?>
--EXPECT--
string(3) "foo"
int(42)
+2
View File
@@ -947,6 +947,8 @@ void zend_set_utility_values(zend_utility_values *utility_values) /* {{{ */
/* this should be compatible with the standard zenderror */
ZEND_COLD void zenderror(const char *error) /* {{{ */
{
CG(parse_error) = 0;
if (EG(exception)) {
/* An exception was thrown in the lexer, don't throw another in the parser. */
return;
+1 -1
View File
@@ -22,7 +22,7 @@
#ifndef ZEND_H
#define ZEND_H
#define ZEND_VERSION "3.2.0-dev"
#define ZEND_VERSION "3.2.0"
#define ZEND_ENGINE_3
+10 -3
View File
@@ -3129,7 +3129,8 @@ get_function_via_handler:
(!fcc->function_handler->common.scope ||
!instanceof_function(ce_org, fcc->function_handler->common.scope))) {
if (fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
fcc->function_handler->common.function_name) {
zend_string_release(fcc->function_handler->common.function_name);
}
zend_free_trampoline(fcc->function_handler);
@@ -3355,7 +3356,8 @@ again:
((fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) ||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
fcc->function_handler->common.function_name) {
zend_string_release(fcc->function_handler->common.function_name);
}
zend_free_trampoline(fcc->function_handler);
@@ -3413,7 +3415,8 @@ again:
((fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) ||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
fcc->function_handler->common.function_name) {
zend_string_release(fcc->function_handler->common.function_name);
}
zend_free_trampoline(fcc->function_handler);
@@ -3741,7 +3744,11 @@ ZEND_API int zend_declare_property_ex(zend_class_entry *ce, zend_string *name, z
default:
break;
}
/* Must be interned to avoid ZTS data races */
name = zend_new_interned_string(zend_string_copy(name));
}
if (access_type & ZEND_ACC_PUBLIC) {
property_info->name = zend_string_copy(name);
} else if (access_type & ZEND_ACC_PRIVATE) {
+20 -2
View File
@@ -260,6 +260,8 @@ struct _zend_mm_heap {
int peak_chunks_count; /* peak number of allocated chunks for current request */
int cached_chunks_count; /* number of cached chunks */
double avg_chunks_count; /* average number of chunks allocated per request */
int last_chunks_delete_boundary; /* numer of chunks after last deletion */
int last_chunks_delete_count; /* number of deletion over the last boundary */
#if ZEND_MM_CUSTOM
union {
struct {
@@ -283,7 +285,7 @@ struct _zend_mm_chunk {
uint32_t free_pages; /* number of free pages */
uint32_t free_tail; /* number of free pages at the end of chunk */
uint32_t num;
char reserve[64 - (sizeof(void*) * 3 + sizeof(int) * 3)];
char reserve[64 - (sizeof(void*) * 3 + sizeof(uint32_t) * 3)];
zend_mm_heap heap_slot; /* used only in main chunk */
zend_mm_page_map free_map; /* 512 bits or 64 bytes */
zend_mm_page_info map[ZEND_MM_PAGES]; /* 2 KB = 512 * 4 */
@@ -1076,7 +1078,9 @@ static zend_always_inline void zend_mm_delete_chunk(zend_mm_heap *heap, zend_mm_
chunk->next->prev = chunk->prev;
chunk->prev->next = chunk->next;
heap->chunks_count--;
if (heap->chunks_count + heap->cached_chunks_count < heap->avg_chunks_count + 0.1) {
if (heap->chunks_count + heap->cached_chunks_count < heap->avg_chunks_count + 0.1
|| (heap->chunks_count == heap->last_chunks_delete_boundary
&& heap->last_chunks_delete_count >= 4)) {
/* delay deletion */
heap->cached_chunks_count++;
chunk->next = heap->cached_chunks;
@@ -1085,6 +1089,14 @@ static zend_always_inline void zend_mm_delete_chunk(zend_mm_heap *heap, zend_mm_
#if ZEND_MM_STAT || ZEND_MM_LIMIT
heap->real_size -= ZEND_MM_CHUNK_SIZE;
#endif
if (!heap->cached_chunks) {
if (heap->chunks_count != heap->last_chunks_delete_boundary) {
heap->last_chunks_delete_boundary = heap->chunks_count;
heap->last_chunks_delete_count = 0;
} else {
heap->last_chunks_delete_count++;
}
}
if (!heap->cached_chunks || chunk->num > heap->cached_chunks->num) {
zend_mm_chunk_free(heap, chunk, ZEND_MM_CHUNK_SIZE);
} else {
@@ -1819,6 +1831,8 @@ static zend_mm_heap *zend_mm_init(void)
heap->peak_chunks_count = 1;
heap->cached_chunks_count = 0;
heap->avg_chunks_count = 1.0;
heap->last_chunks_delete_boundary = 0;
heap->last_chunks_delete_count = 0;
#if ZEND_MM_STAT || ZEND_MM_LIMIT
heap->real_size = ZEND_MM_CHUNK_SIZE;
#endif
@@ -2235,6 +2249,8 @@ void zend_mm_shutdown(zend_mm_heap *heap, int full, int silent)
p->map[0] = ZEND_MM_LRUN(ZEND_MM_FIRST_PAGE);
heap->chunks_count = 1;
heap->peak_chunks_count = 1;
heap->last_chunks_delete_boundary = 0;
heap->last_chunks_delete_count = 0;
#if ZEND_MM_STAT || ZEND_MM_LIMIT
heap->real_size = ZEND_MM_CHUNK_SIZE;
#endif
@@ -2758,6 +2774,8 @@ ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_handlers *handlers, void
heap->peak_chunks_count = 1;
heap->cached_chunks_count = 0;
heap->avg_chunks_count = 1.0;
heap->last_chunks_delete_boundary = 0;
heap->last_chunks_delete_count = 0;
#if ZEND_MM_STAT || ZEND_MM_LIMIT
heap->real_size = ZEND_MM_CHUNK_SIZE;
#endif
+10 -3
View File
@@ -500,6 +500,7 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp) /* {{{
zval val;
struct _zend_arg_info *arg_info = closure->func.common.arg_info;
HashTable *debug_info;
zend_bool zstr_args = (closure->func.type == ZEND_USER_FUNCTION) || (closure->func.common.fn_flags & ZEND_ACC_USER_ARG_INFO);
*is_temp = 1;
@@ -532,9 +533,15 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp) /* {{{
zend_string *name;
zval info;
if (arg_info->name) {
name = zend_strpprintf(0, "%s$%s",
arg_info->pass_by_reference ? "&" : "",
ZSTR_VAL(arg_info->name));
if (zstr_args) {
name = zend_strpprintf(0, "%s$%s",
arg_info->pass_by_reference ? "&" : "",
ZSTR_VAL(arg_info->name));
} else {
name = zend_strpprintf(0, "%s$%s",
arg_info->pass_by_reference ? "&" : "",
((zend_internal_arg_info*)arg_info)->name);
}
} else {
name = zend_strpprintf(0, "%s$param%d",
arg_info->pass_by_reference ? "&" : "",
+60 -31
View File
@@ -562,9 +562,10 @@ ZEND_API uint32_t *zend_get_property_guard(zend_object *zobj, zend_string *membe
zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) /* {{{ */
{
zend_object *zobj;
zval tmp_member;
zval tmp_member, tmp_object;
zval *retval;
uint32_t property_offset;
uint32_t *guard = NULL;
zobj = Z_OBJ_P(object);
@@ -597,12 +598,18 @@ zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_
goto exit;
}
ZVAL_UNDEF(&tmp_object);
/* magic isset */
if ((type == BP_VAR_IS) && zobj->ce->__isset) {
zval tmp_object, tmp_result;
uint32_t *guard = zend_get_property_guard(zobj, Z_STR_P(member));
zval tmp_result;
guard = zend_get_property_guard(zobj, Z_STR_P(member));
if (!((*guard) & IN_ISSET)) {
if (Z_TYPE(tmp_member) == IS_UNDEF) {
ZVAL_COPY(&tmp_member, member);
member = &tmp_member;
}
ZVAL_COPY(&tmp_object, object);
ZVAL_UNDEF(&tmp_result);
@@ -617,19 +624,20 @@ zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_
goto exit;
}
zval_ptr_dtor(&tmp_object);
zval_ptr_dtor(&tmp_result);
}
}
/* magic get */
if (zobj->ce->__get) {
uint32_t *guard = zend_get_property_guard(zobj, Z_STR_P(member));
if (guard == NULL) {
guard = zend_get_property_guard(zobj, Z_STR_P(member));
}
if (!((*guard) & IN_GET)) {
zval tmp_object;
/* have getter - try with it! */
ZVAL_COPY(&tmp_object, object);
if (Z_TYPE(tmp_object) == IS_UNDEF) {
ZVAL_COPY(&tmp_object, object);
}
*guard |= IN_GET; /* prevent circular getting */
zend_std_call_getter(&tmp_object, member, rv);
*guard &= ~IN_GET;
@@ -649,6 +657,7 @@ zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_
zval_ptr_dtor(&tmp_object);
goto exit;
} else {
zval_ptr_dtor(&tmp_object);
if (Z_STRVAL_P(member)[0] == '\0' && Z_STRLEN_P(member) != 0) {
zend_throw_error(NULL, "Cannot access property started with '\\0'");
retval = &EG(uninitialized_zval);
@@ -656,6 +665,9 @@ zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_
}
}
}
zval_ptr_dtor(&tmp_object);
if ((type != BP_VAR_IS)) {
zend_error(E_NOTICE,"Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), Z_STRVAL_P(member));
}
@@ -764,34 +776,38 @@ exit:
zval *zend_std_read_dimension(zval *object, zval *offset, int type, zval *rv) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
zval tmp;
zval tmp_offset, tmp_object;
if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1) != 0)) {
if (offset == NULL) {
/* [] construct */
ZVAL_NULL(&tmp);
offset = &tmp;
ZVAL_NULL(&tmp_offset);
} else {
SEPARATE_ARG_IF_REF(offset);
ZVAL_DEREF(offset);
ZVAL_COPY(&tmp_offset, offset);
}
ZVAL_COPY(&tmp_object, object);
if (type == BP_VAR_IS) {
zend_call_method_with_1_params(object, ce, NULL, "offsetexists", rv, offset);
zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetexists", rv, &tmp_offset);
if (UNEXPECTED(Z_ISUNDEF_P(rv))) {
zval_ptr_dtor(offset);
zval_ptr_dtor(&tmp_object);
zval_ptr_dtor(&tmp_offset);
return NULL;
}
if (!i_zend_is_true(rv)) {
zval_ptr_dtor(offset);
zval_ptr_dtor(&tmp_object);
zval_ptr_dtor(&tmp_offset);
zval_ptr_dtor(rv);
return &EG(uninitialized_zval);
}
zval_ptr_dtor(rv);
}
zend_call_method_with_1_params(object, ce, NULL, "offsetget", rv, offset);
zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetget", rv, &tmp_offset);
zval_ptr_dtor(offset);
zval_ptr_dtor(&tmp_object);
zval_ptr_dtor(&tmp_offset);
if (UNEXPECTED(Z_TYPE_P(rv) == IS_UNDEF)) {
if (UNEXPECTED(!EG(exception))) {
@@ -810,17 +826,19 @@ zval *zend_std_read_dimension(zval *object, zval *offset, int type, zval *rv) /*
static void zend_std_write_dimension(zval *object, zval *offset, zval *value) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
zval tmp;
zval tmp_offset, tmp_object;
if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1) != 0)) {
if (!offset) {
ZVAL_NULL(&tmp);
offset = &tmp;
ZVAL_NULL(&tmp_offset);
} else {
SEPARATE_ARG_IF_REF(offset);
ZVAL_DEREF(offset);
ZVAL_COPY(&tmp_offset, offset);
}
zend_call_method_with_2_params(object, ce, NULL, "offsetset", NULL, offset, value);
zval_ptr_dtor(offset);
ZVAL_COPY(&tmp_object, object);
zend_call_method_with_2_params(&tmp_object, ce, NULL, "offsetset", NULL, &tmp_offset, value);
zval_ptr_dtor(&tmp_object);
zval_ptr_dtor(&tmp_offset);
} else {
zend_throw_error(NULL, "Cannot use object of type %s as array", ZSTR_VAL(ce->name));
}
@@ -830,17 +848,19 @@ static void zend_std_write_dimension(zval *object, zval *offset, zval *value) /*
static int zend_std_has_dimension(zval *object, zval *offset, int check_empty) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
zval retval;
zval retval, tmp_offset, tmp_object;
int result;
if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1) != 0)) {
SEPARATE_ARG_IF_REF(offset);
zend_call_method_with_1_params(object, ce, NULL, "offsetexists", &retval, offset);
ZVAL_DEREF(offset);
ZVAL_COPY(&tmp_offset, offset);
ZVAL_COPY(&tmp_object, object);
zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetexists", &retval, &tmp_offset);
if (EXPECTED(Z_TYPE(retval) != IS_UNDEF)) {
result = i_zend_is_true(&retval);
zval_ptr_dtor(&retval);
if (check_empty && result && EXPECTED(!EG(exception))) {
zend_call_method_with_1_params(object, ce, NULL, "offsetget", &retval, offset);
zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetget", &retval, &tmp_offset);
if (EXPECTED(Z_TYPE(retval) != IS_UNDEF)) {
result = i_zend_is_true(&retval);
zval_ptr_dtor(&retval);
@@ -849,7 +869,8 @@ static int zend_std_has_dimension(zval *object, zval *offset, int check_empty) /
} else {
result = 0;
}
zval_ptr_dtor(offset);
zval_ptr_dtor(&tmp_object);
zval_ptr_dtor(&tmp_offset);
} else {
zend_throw_error(NULL, "Cannot use object of type %s as array", ZSTR_VAL(ce->name));
return 0;
@@ -1006,11 +1027,15 @@ exit:
static void zend_std_unset_dimension(zval *object, zval *offset) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
zval tmp_offset, tmp_object;
if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1)) {
SEPARATE_ARG_IF_REF(offset);
zend_call_method_with_1_params(object, ce, NULL, "offsetunset", NULL, offset);
zval_ptr_dtor(offset);
ZVAL_DEREF(offset);
ZVAL_COPY(&tmp_offset, offset);
ZVAL_COPY(&tmp_object, object);
zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetunset", NULL, &tmp_offset);
zval_ptr_dtor(&tmp_object);
zval_ptr_dtor(&tmp_offset);
} else {
zend_throw_error(NULL, "Cannot use object of type %s as array", ZSTR_VAL(ce->name));
}
@@ -1561,6 +1586,10 @@ found:
zval tmp_object;
/* have issetter - try with it! */
if (Z_TYPE(tmp_member) == IS_UNDEF) {
ZVAL_COPY(&tmp_member, member);
member = &tmp_member;
}
ZVAL_COPY(&tmp_object, object);
(*guard) |= IN_ISSET; /* prevent circular getting */
zend_std_call_issetter(&tmp_object, member, &rv);
+31
View File
@@ -142,6 +142,25 @@ ZEND_API void zend_function_dtor(zval *zv)
ZEND_ASSERT(function->type == ZEND_INTERNAL_FUNCTION);
ZEND_ASSERT(function->common.function_name);
zend_string_release(function->common.function_name);
#ifndef ZTS
if ((function->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS)) &&
!function->common.scope && function->common.arg_info) {
uint32_t i;
uint32_t num_args = function->common.num_args + 1;
zend_arg_info *arg_info = function->common.arg_info - 1;
if (function->common.fn_flags & ZEND_ACC_VARIADIC) {
num_args++;
}
for (i = 0 ; i < num_args; i++) {
if (ZEND_TYPE_IS_CLASS(arg_info[i].type)) {
zend_string_release(ZEND_TYPE_NAME(arg_info[i].type));
}
}
free(arg_info);
}
#endif
if (!(function->common.fn_flags & ZEND_ACC_ARENA_ALLOCATED)) {
pefree(function, 1);
}
@@ -227,6 +246,9 @@ ZEND_API void destroy_zend_class(zval *zv)
{
zend_property_info *prop_info;
zend_class_entry *ce = Z_PTR_P(zv);
#ifndef ZTS
zend_function *fn;
#endif
if (--ce->refcount > 0) {
return;
@@ -310,6 +332,15 @@ ZEND_API void destroy_zend_class(zval *zv)
}
zend_hash_destroy(&ce->properties_info);
zend_string_release(ce->name);
#ifndef ZTS
ZEND_HASH_FOREACH_PTR(&ce->function_table, fn) {
if ((fn->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS)) &&
fn->common.scope == ce) {
/* reset function scope to allow arg_info removing */
fn->common.scope = NULL;
}
} ZEND_HASH_FOREACH_END();
#endif
zend_hash_destroy(&ce->function_table);
if (zend_hash_num_elements(&ce->constants_table)) {
zend_class_constant *c;
+3 -1
View File
@@ -225,8 +225,10 @@ ZEND_API void ZEND_FASTCALL convert_scalar_to_number(zval *op) /* {{{ */
if (Z_TYPE(holder) == IS_LONG) { \
if (op == result) { \
zval_ptr_dtor(op); \
ZVAL_LONG(op, Z_LVAL(holder)); \
} else { \
(op) = &(holder); \
} \
(op) = &(holder); \
} \
break; \
} \
+4 -2
View File
@@ -167,8 +167,10 @@ ZEND_API void ZEND_FASTCALL _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
{
if (EXPECTED(Z_TYPE_P(zvalue) == IS_ARRAY)) {
ZVAL_ARR(zvalue, zend_array_dup(Z_ARRVAL_P(zvalue)));
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_STRING) ||
EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT)) {
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_STRING)) {
CHECK_ZVAL_STRING_REL(Z_STR_P(zvalue));
ZVAL_NEW_STR(zvalue, zend_string_dup(Z_STR_P(zvalue), 0));
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT)) {
CHECK_ZVAL_STRING_REL(Z_STR_P(zvalue));
Z_STR_P(zvalue) = zend_string_dup(Z_STR_P(zvalue), 0);
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT_AST)) {
+1 -1
View File
@@ -616,7 +616,7 @@ CWD_API void realpath_cache_del(const char *path, size_t path_len) /* {{{ */
}
/* }}} */
static inline void realpath_cache_add(const char *path, int path_len, const char *realpath, size_t realpath_len, int is_dir, time_t t) /* {{{ */
static inline void realpath_cache_add(const char *path, size_t path_len, const char *realpath, size_t realpath_len, int is_dir, time_t t) /* {{{ */
{
zend_long size = sizeof(realpath_cache_bucket) + path_len + 1;
int same = 1;
+11 -2
View File
@@ -2,6 +2,7 @@
set SDK_REMOTE=https://github.com/OSTC/php-sdk-binary-tools.git
set SDK_BRANCH=%PHP_BUILD_SDK_BRANCH%
set SDK_RUNNER=%PHP_BUILD_CACHE_SDK_DIR%\phpsdk-%PHP_BUILD_CRT%-%PLATFORM%.bat
if not exist "%PHP_BUILD_CACHE_BASE_DIR%" (
echo Creating %PHP_BUILD_CACHE_BASE_DIR%
@@ -13,17 +14,25 @@ if not exist "%PHP_BUILD_OBJ_DIR%" (
mkdir "%PHP_BUILD_OBJ_DIR%"
)
if not exist "%SDK_RUNNER%" (
if exist "%PHP_BUILD_CACHE_SDK_DIR%" rmdir /s /q "%PHP_BUILD_CACHE_SDK_DIR%"
)
if not exist "%PHP_BUILD_CACHE_SDK_DIR%" (
echo Cloning remote SDK repository
git clone --branch %SDK_BRANCH% %SDK_REMOTE% "%PHP_BUILD_CACHE_SDK_DIR%" 2>&1
) else (
)
for /f "tokens=*" %%a in ('type %PHP_BUILD_CACHE_SDK_DIR%\VERSION') do set GOT_SDK_VER=%%a
echo Got SDK version %GOT_SDK_VER%
if NOT "%GOT_SDK_VER%" == "%PHP_BUILD_SDK_BRANCH:~8%" (
echo Switching to the configured SDK version %SDK_BRANCH:~8%
echo Fetching remote SDK repository
git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" fetch --prune origin 2>&1
echo Checkout SDK repository branch
git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" checkout --force %SDK_BRANCH%
)
set SDK_RUNNER=%PHP_BUILD_CACHE_SDK_DIR%\phpsdk-%PHP_BUILD_CRT%-%PLATFORM%.bat
if not exist "%SDK_RUNNER%" (
echo "%SDK_RUNNER%" doesn't exist
exit /b 3
+2
View File
@@ -8,6 +8,8 @@ if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw >NUL 2>NUL
if %errorlevel% neq 0 exit /b 3
if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw-w64 >NUL 2>NUL
if %errorlevel% neq 0 exit /b 3
if "%APPVEYOR%" equ "True" rmdir /s /q C:\msys64 >NUL 2>NUL
if %errorlevel% neq 0 exit /b 3
cd /D %APPVEYOR_BUILD_FOLDER%
if %errorlevel% neq 0 exit /b 3
+1 -1
View File
@@ -108,7 +108,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=7
PHP_MINOR_VERSION=2
PHP_RELEASE_VERSION=0
PHP_EXTRA_VERSION="-dev"
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
+17 -4
View File
@@ -60,9 +60,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_bcdiv, 0, 0, 2)
ZEND_ARG_INFO(0, scale)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_bcmod, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_bcmod, 0, 0, 2)
ZEND_ARG_INFO(0, left_operand)
ZEND_ARG_INFO(0, right_operand)
ZEND_ARG_INFO(0, scale)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_bcpowmod, 0, 0, 3)
@@ -388,26 +389,38 @@ PHP_FUNCTION(bcdiv)
}
/* }}} */
/* {{{ proto string bcmod(string left_operand, string right_operand)
/* {{{ proto string bcmod(string left_operand, string right_operand [, int scale])
Returns the modulus of the two arbitrary precision operands */
PHP_FUNCTION(bcmod)
{
zend_string *left, *right;
zend_long scale_param = 0;
bc_num first, second, result;
int scale = (int)BCG(bc_precision);
ZEND_PARSE_PARAMETERS_START(2, 2)
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(left)
Z_PARAM_STR(right)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(scale_param)
ZEND_PARSE_PARAMETERS_END();
if (ZEND_NUM_ARGS() == 3) {
scale = (int) ((int)scale_param < 0 ? 0 : scale_param);
}
bc_init_num(&first);
bc_init_num(&second);
bc_init_num(&result);
php_str2num(&first, ZSTR_VAL(left));
php_str2num(&second, ZSTR_VAL(right));
switch (bc_modulo(first, second, &result, 0)) {
switch (bc_modulo(first, second, &result, scale)) {
case 0:
if (result->n_scale > scale) {
result = split_bc_num(result);
result->n_scale = scale;
}
RETVAL_STR(bc_num2str(result));
break;
case -1:
+2 -2
View File
@@ -9,7 +9,7 @@ bcmath.scale=0
echo bcmod("11", "2"),"\n";
echo bcmod("-1", "5"),"\n";
echo bcmod("8728932001983192837219398127471", "1928372132132819737213"),"\n";
echo bcmod("3.5", "4"),"\n";
echo bcmod("3.5", "4", 1),"\n";
echo bcmod("1071", "357.5"),"\n";
?>
--EXPECT--
@@ -17,4 +17,4 @@ echo bcmod("1071", "357.5"),"\n";
-1
1459434331351930289678
3.5
356.0
356
+2 -2
View File
@@ -7,7 +7,7 @@ antoni@solucionsinternet.com
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--FILE--
<?php
echo bcmod('1', '2', '3');
echo bcmod('1', '2', '3', '4');
?>
--EXPECTF--
Warning: bcmod() expects exactly 2 parameters, 3 given in %s.php on line %d
Warning: bcmod() expects at most 3 parameters, 4 given in %s.php on line %d
+1 -1
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.15.3 on Mon Sep 4 22:44:17 2017 */
/* Generated by re2c 0.15.3 on Tue Oct 24 13:44:48 2017 */
#line 1 "ext/date/lib/parse_date.re"
/*
* The MIT License (MIT)
+1009 -1078
View File
File diff suppressed because it is too large. Load diff
+4 -7
View File
@@ -446,7 +446,6 @@
{ "cst", 0, -21600, "America/Thunder_Bay" },
{ "cst", 0, -21600, "America/Winnipeg" },
{ "cst", 0, -21600, "Canada/Central" },
{ "cst", 0, -21600, "Canada/East-Saskatchewan" },
{ "cst", 0, -21600, "Canada/Saskatchewan" },
{ "cst", 0, -21600, "Mexico/BajaSur" },
{ "cst", 0, -21600, "Mexico/General" },
@@ -760,7 +759,6 @@
{ "mdt", 1, -21600, "America/Shiprock" },
{ "mdt", 1, -21600, "America/Swift_Current" },
{ "mdt", 1, -21600, "America/Yellowknife" },
{ "mdt", 1, -21600, "Canada/East-Saskatchewan" },
{ "mdt", 1, -21600, "Canada/Mountain" },
{ "mdt", 1, -21600, "Canada/Saskatchewan" },
{ "mdt", 1, -21600, "Mexico/BajaSur" },
@@ -772,6 +770,8 @@
{ "mmt", 0, -2670, "Africa/Monrovia" },
{ "mmt", 0, 17640, "Indian/Maldives" },
{ "mmt", 0, 19172, "Asia/Colombo" },
{ "mmt", 0, 19270, "Asia/Calcutta" },
{ "mmt", 0, 19270, "Asia/Kolkata" },
{ "mmt", 0, 28656, "Asia/Makassar" },
{ "mmt", 0, 28656, "Asia/Ujung_Pandang" },
{ "mmt", 0, 6600, "Europe/Minsk" },
@@ -786,7 +786,6 @@
{ "mpt", 1, -21600, "America/Shiprock" },
{ "mpt", 1, -21600, "America/Swift_Current" },
{ "mpt", 1, -21600, "America/Yellowknife" },
{ "mpt", 1, -21600, "Canada/East-Saskatchewan" },
{ "mpt", 1, -21600, "Canada/Mountain" },
{ "mpt", 1, -21600, "Canada/Saskatchewan" },
{ "msd", 1, 14400, "Europe/Moscow" },
@@ -840,7 +839,6 @@
{ "mst", 0, -25200, "America/Swift_Current" },
{ "mst", 0, -25200, "America/Tijuana" },
{ "mst", 0, -25200, "America/Yellowknife" },
{ "mst", 0, -25200, "Canada/East-Saskatchewan" },
{ "mst", 0, -25200, "Canada/Mountain" },
{ "mst", 0, -25200, "Canada/Saskatchewan" },
{ "mst", 0, -25200, "Mexico/BajaNorte" },
@@ -859,7 +857,6 @@
{ "mwt", 1, -21600, "America/Shiprock" },
{ "mwt", 1, -21600, "America/Swift_Current" },
{ "mwt", 1, -21600, "America/Yellowknife" },
{ "mwt", 1, -21600, "Canada/East-Saskatchewan" },
{ "mwt", 1, -21600, "Canada/Mountain" },
{ "mwt", 1, -21600, "Canada/Saskatchewan" },
{ "nddt", 1, -5400, "America/St_Johns" },
@@ -994,8 +991,8 @@
{ "pwt", 1, -25200, "Mexico/BajaNorte" },
{ "qmt", 0, -18840, "America/Guayaquil" },
{ "rmt", 0, 5794, "Europe/Riga" },
{ "rmt", 0, 23080, "Asia/Rangoon" },
{ "rmt", 0, 23080, "Asia/Yangon" },
{ "rmt", 0, 23087, "Asia/Rangoon" },
{ "rmt", 0, 23087, "Asia/Yangon" },
{ "rmt", 0, 2996, "Europe/Rome" },
{ "rmt", 0, 2996, "Europe/San_Marino" },
{ "rmt", 0, 2996, "Europe/Vatican" },
+37 -2
View File
@@ -659,6 +659,7 @@ static HashTable *date_object_get_gc_timezone(zval *object, zval **table, int *n
zval *date_interval_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv);
void date_interval_write_property(zval *object, zval *member, zval *value, void **cache_slot);
static zval *date_interval_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot);
static zval *date_period_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv);
static void date_period_write_property(zval *object, zval *member, zval *value, void **cache_slot);
@@ -2149,7 +2150,7 @@ static void date_register_classes(void) /* {{{ */
date_object_handlers_interval.read_property = date_interval_read_property;
date_object_handlers_interval.write_property = date_interval_write_property;
date_object_handlers_interval.get_properties = date_object_get_properties_interval;
date_object_handlers_interval.get_property_ptr_ptr = NULL;
date_object_handlers_interval.get_property_ptr_ptr = date_interval_get_property_ptr_ptr;
date_object_handlers_interval.get_gc = date_object_get_gc_interval;
INIT_CLASS_ENTRY(ce_period, "DatePeriod", date_funcs_period);
@@ -4165,7 +4166,7 @@ zval *date_interval_read_property(zval *object, zval *member, int type, void **c
GET_VALUE_FROM_STRUCT(i, "i");
GET_VALUE_FROM_STRUCT(s, "s");
if (strcmp(Z_STRVAL_P(member), "f") == 0) {
fvalue = obj->diff->us / 1000000;
fvalue = obj->diff->us / 1000000.0;
break;
}
GET_VALUE_FROM_STRUCT(invert, "invert");
@@ -4250,6 +4251,40 @@ void date_interval_write_property(zval *object, zval *member, zval *value, void
}
/* }}} */
/* {{{ date_interval_get_property_ptr_ptr */
static zval *date_interval_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot)
{
zval tmp_member, *ret;
if (Z_TYPE_P(member) != IS_STRING) {
tmp_member = *member;
zval_copy_ctor(&tmp_member);
convert_to_string(&tmp_member);
member = &tmp_member;
cache_slot = NULL;
}
if(zend_binary_strcmp("y", sizeof("y") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
zend_binary_strcmp("m", sizeof("m") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
zend_binary_strcmp("d", sizeof("d") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
zend_binary_strcmp("h", sizeof("h") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
zend_binary_strcmp("i", sizeof("i") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
zend_binary_strcmp("s", sizeof("s") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
zend_binary_strcmp("days", sizeof("days") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
zend_binary_strcmp("invert", sizeof("invert") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0) {
/* Fallback to read_property. */
ret = NULL;
} else {
ret = (zend_get_std_object_handlers())->get_property_ptr_ptr(object, member, type, cache_slot);
}
if (member == &tmp_member) {
zval_dtor(member);
}
return ret;
}
/* }}} */
/* {{{ proto DateInterval::__construct([string interval_spec])
Creates new DateInterval object.
+1 -1
View File
@@ -40,7 +40,7 @@ object(DateInterval)#%d (16) {
["special_amount"]=>
int(-1)
["have_weekday_relative"]=>
int(9)
int(%d)
["have_special_relative"]=>
int(0)
["f"]=>
+17
View File
@@ -0,0 +1,17 @@
--TEST--
Bug #75222 DateInterval microseconds property always 0
--FILE--
<?php
$dt1 = new \DateTimeImmutable('2017-01-01T00:00:00.000000Z');
$dt2 = new \DateTimeImmutable('2017-01-01T00:00:00.123456Z');
$diff = $dt1->diff($dt2);
//var_dump($diff);
var_dump($diff->f);
var_dump(get_object_vars($diff)['f']);
var_dump($diff->f === get_object_vars($diff)['f']);
?>
--EXPECTF--
float(0.123456)
float(0.123456)
bool(true)
@@ -0,0 +1,16 @@
--TEST--
Test DateInterval props with dimension handling
--FILE--
<?php
class Z extends DateInterval{}
$z = new Z('P2Y4DT6H8M');
$i = 0;
$z->prop[1]=10;
while ($i < 1026) {
$z->prop[$i] = $i;
$i++;
}
?>
==NOCRASH==
--EXPECT--
==NOCRASH==
+5 -1
View File
@@ -323,7 +323,6 @@ PHP_MINFO_FUNCTION(enchant)
#elif defined(HAVE_ENCHANT_BROKER_SET_PARAM)
php_info_print_table_row(2, "Libenchant Version", "1.5.0 or later");
#endif
php_info_print_table_row(2, "Revision", "$Id$");
php_info_print_table_end();
php_info_print_table_start();
@@ -483,6 +482,11 @@ PHP_FUNCTION(enchant_broker_get_dict_path)
RETURN_FALSE;
}
if (value == NULL) {
php_error_docref(NULL, E_WARNING, "dict_path not set");
RETURN_FALSE;
}
RETURN_STRING(value);
}
/* }}} */
+1 -1
View File
@@ -24,7 +24,7 @@
extern zend_module_entry enchant_module_entry;
#define phpext_enchant_ptr &enchant_module_entry
#define PHP_ENCHANT_VERSION "1.1.0"
#define PHP_ENCHANT_VERSION PHP_VERSION
#ifdef PHP_WIN32
#define PHP_ENCHANT_API __declspec(dllexport)
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #53070 (enchant_broker_get_path crashes if no path is set)
--SKIPIF--
<?php
if(!extension_loaded('enchant')) die('skip, enchant not loader');
if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
?>
--FILE--
<?php
$broker = enchant_broker_init();
var_dump(enchant_broker_get_dict_path($broker, ENCHANT_MYSPELL));
var_dump(enchant_broker_get_dict_path($broker, ENCHANT_ISPELL));
?>
--EXPECTF--
Warning: enchant_broker_get_dict_path(): dict_path not set in %s on line %d
bool(false)
Warning: enchant_broker_get_dict_path(): dict_path not set in %s on line %d
bool(false)
+1 -1
View File
@@ -22,7 +22,7 @@
#if HAVE_EXIF
#include "php_version.h"
#define PHP_EXIF_VERSION "1.4 $Id: 8bdc0c8f27c2c9dd1f7551f1f9fe3ab57a06a4b1 $"
#define PHP_EXIF_VERSION PHP_VERSION
extern zend_module_entry exif_module_entry;
#define phpext_exif_ptr &exif_module_entry
+1 -1
View File
@@ -1,2 +1,2 @@
fileinfo
Ilia Alshanetsky, Pierre Alain Joye, Scott MacVicar, Derick Rethans
Ilia Alshanetsky, Pierre Alain Joye, Scott MacVicar, Derick Rethans, Anatol Belski
+132806 -125131
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+22 -7
View File
@@ -34,7 +34,7 @@
#include "file.h"
#ifndef lint
FILE_RCSID("@(#)$File: apprentice.c,v 1.255 2016/10/24 18:02:17 christos Exp $")
FILE_RCSID("@(#)$File: apprentice.c,v 1.260 2017/04/28 16:27:58 christos Exp $")
#endif /* lint */
#include "magic.h"
@@ -2235,7 +2235,7 @@ parse_ext(struct magic_set *ms, struct magic_entry *me, const char *line)
return parse_extra(ms, me, line,
CAST(off_t, offsetof(struct magic, ext)),
sizeof(m->ext), "EXTENSION", ",!+-/", 0);
sizeof(m->ext), "EXTENSION", ",!+-/@", 0);
}
/*
@@ -2296,6 +2296,8 @@ check_format_type(const char *ptr, int type, const char **estr)
ptr++;
if (*ptr == '.')
ptr++;
if (*ptr == '#')
ptr++;
#define CHECKLEN() do { \
for (len = cnt = 0; isdigit((unsigned char)*ptr); ptr++, cnt++) \
len = len * 10 + (*ptr - '0'); \
@@ -2851,7 +2853,7 @@ apprentice_buf(struct magic_set *ms, struct magic *buf, size_t len)
{
struct magic_map *map;
if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL) {
if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))) == NULL) {
file_oomem(ms, sizeof(*map));
return NULL;
}
@@ -3289,22 +3291,35 @@ file_pstring_get_length(const struct magic *m, const char *ss)
{
size_t len = 0;
const unsigned char *s = (const unsigned char *)ss;
unsigned int s3, s2, s1, s0;
switch (m->str_flags & PSTRING_LEN) {
case PSTRING_1_LE:
len = *s;
break;
case PSTRING_2_LE:
len = (s[1] << 8) | s[0];
s0 = s[0];
s1 = s[1];
len = (s1 << 8) | s0;
break;
case PSTRING_2_BE:
len = (s[0] << 8) | s[1];
s0 = s[0];
s1 = s[1];
len = (s0 << 8) | s1;
break;
case PSTRING_4_LE:
len = (s[3] << 24) | (s[2] << 16) | (s[1] << 8) | s[0];
s0 = s[0];
s1 = s[1];
s2 = s[2];
s3 = s[3];
len = (s3 << 24) | (s2 << 16) | (s1 << 8) | s0;
break;
case PSTRING_4_BE:
len = (s[0] << 24) | (s[1] << 16) | (s[2] << 8) | s[3];
s0 = s[0];
s1 = s[1];
s2 = s[2];
s3 = s[3];
len = (s0 << 24) | (s1 << 16) | (s2 << 8) | s3;
break;
default:
abort(); /* Impossible */
+209 -134
View File
@@ -35,7 +35,7 @@
#include "file.h"
#ifndef lint
FILE_RCSID("@(#)$File: cdf.c,v 1.85 2016/10/24 18:02:17 christos Exp $")
FILE_RCSID("@(#)$File: cdf.c,v 1.106 2017/04/30 17:05:02 christos Exp $")
#endif
#include <assert.h>
@@ -90,6 +90,31 @@ static union {
CDF_TOLE8(CAST(uint64_t, x))))
#define CDF_GETUINT32(x, y) cdf_getuint32(x, y)
#define CDF_MALLOC(n) cdf_malloc(__FILE__, __LINE__, (n))
#define CDF_REALLOC(p, n) cdf_realloc(__FILE__, __LINE__, (p), (n))
#define CDF_CALLOC(n, u) cdf_calloc(__FILE__, __LINE__, (n), (u))
static void *
cdf_malloc(const char *file, size_t line, size_t n)
{
DPRINTF(("%s,%zu: %s %zu\n", file, line, __func__, n));
return malloc(n);
}
static void *
cdf_realloc(const char *file, size_t line, void *p, size_t n)
{
DPRINTF(("%s,%zu: %s %zu\n", file, line, __func__, n));
return realloc(p, n);
}
static void *
cdf_calloc(const char *file, size_t line, size_t n, size_t u)
{
DPRINTF(("%s,%zu: %s %zu %zu\n", file, line, __func__, n, u));
return calloc(n, u);
}
/*
* swap a short
@@ -354,18 +379,18 @@ cdf_read_header(const cdf_info_t *info, cdf_header_t *h)
cdf_unpack_header(h, buf);
cdf_swap_header(h);
if (h->h_magic != CDF_MAGIC) {
DPRINTF(("Bad magic 0x%" INT64_T_FORMAT "x != 0x%"
DPRINTF(("Bad magic %#" INT64_T_FORMAT "x != %#"
INT64_T_FORMAT "x\n",
(unsigned long long)h->h_magic,
(unsigned long long)CDF_MAGIC));
goto out;
}
if (h->h_sec_size_p2 > 20) {
DPRINTF(("Bad sector size 0x%u\n", h->h_sec_size_p2));
DPRINTF(("Bad sector size %hu\n", h->h_sec_size_p2));
goto out;
}
if (h->h_short_sec_size_p2 > 20) {
DPRINTF(("Bad short sector size 0x%u\n",
DPRINTF(("Bad short sector size %hu\n",
h->h_short_sec_size_p2));
goto out;
}
@@ -422,7 +447,7 @@ cdf_read_sat(const cdf_info_t *info, cdf_header_t *h, cdf_sat_t *sat)
if (h->h_master_sat[i] == CDF_SECID_FREE)
break;
#define CDF_SEC_LIMIT (UINT32_MAX / (4 * ss))
#define CDF_SEC_LIMIT (UINT32_MAX / (8 * ss))
if ((nsatpersec > 0 &&
h->h_num_sectors_in_master_sat > CDF_SEC_LIMIT / nsatpersec) ||
i > CDF_SEC_LIMIT) {
@@ -435,7 +460,7 @@ cdf_read_sat(const cdf_info_t *info, cdf_header_t *h, cdf_sat_t *sat)
sat->sat_len = h->h_num_sectors_in_master_sat * nsatpersec + i;
DPRINTF(("sat_len = %" SIZE_T_FORMAT "u ss = %" SIZE_T_FORMAT "u\n",
sat->sat_len, ss));
if ((sat->sat_tab = CAST(cdf_secid_t *, calloc(sat->sat_len, ss)))
if ((sat->sat_tab = CAST(cdf_secid_t *, CDF_CALLOC(sat->sat_len, ss)))
== NULL)
return -1;
@@ -449,7 +474,7 @@ cdf_read_sat(const cdf_info_t *info, cdf_header_t *h, cdf_sat_t *sat)
}
}
if ((msa = CAST(cdf_secid_t *, calloc(1, ss))) == NULL)
if ((msa = CAST(cdf_secid_t *, CDF_CALLOC(1, ss))) == NULL)
goto out1;
mid = h->h_secid_first_sector_in_master_sat;
@@ -541,13 +566,16 @@ cdf_read_long_sector_chain(const cdf_info_t *info, const cdf_header_t *h,
ssize_t nr;
scn->sst_tab = NULL;
scn->sst_len = cdf_count_chain(sat, sid, ss);
scn->sst_dirlen = len;
scn->sst_dirlen = MAX(h->h_min_size_standard_stream, len);
scn->sst_ss = ss;
if (sid == CDF_SECID_END_OF_CHAIN || len == 0)
return cdf_zero_stream(scn);
if (scn->sst_len == (size_t)-1)
goto out;
scn->sst_tab = calloc(scn->sst_len, ss);
scn->sst_tab = CDF_CALLOC(scn->sst_len, ss);
if (scn->sst_tab == NULL)
return cdf_zero_stream(scn);
@@ -593,7 +621,7 @@ cdf_read_short_sector_chain(const cdf_header_t *h,
if (scn->sst_len == (size_t)-1)
goto out;
scn->sst_tab = calloc(scn->sst_len, ss);
scn->sst_tab = CDF_CALLOC(scn->sst_len, ss);
if (scn->sst_tab == NULL)
return cdf_zero_stream(scn);
@@ -651,11 +679,11 @@ cdf_read_dir(const cdf_info_t *info, const cdf_header_t *h,
dir->dir_len = ns * nd;
dir->dir_tab = CAST(cdf_directory_t *,
calloc(dir->dir_len, sizeof(dir->dir_tab[0])));
CDF_CALLOC(dir->dir_len, sizeof(dir->dir_tab[0])));
if (dir->dir_tab == NULL)
return -1;
if ((buf = CAST(char *, malloc(ss))) == NULL) {
if ((buf = CAST(char *, CDF_MALLOC(ss))) == NULL) {
free(dir->dir_tab);
return -1;
}
@@ -701,7 +729,7 @@ cdf_read_ssat(const cdf_info_t *info, const cdf_header_t *h,
if (ssat->sat_len == (size_t)-1)
goto out;
ssat->sat_tab = CAST(cdf_secid_t *, calloc(ssat->sat_len, ss));
ssat->sat_tab = CAST(cdf_secid_t *, CDF_CALLOC(ssat->sat_len, ss));
if (ssat->sat_tab == NULL)
goto out1;
@@ -822,13 +850,107 @@ cdf_find_stream(const cdf_dir_t *dir, const char *name, int type)
== 0)
break;
if (i > 0)
return i;
return CAST(int, i);
DPRINTF(("Cannot find type %d `%s'\n", type, name));
errno = ESRCH;
return 0;
}
#define CDF_SHLEN_LIMIT (UINT32_MAX / 8)
#define CDF_PROP_LIMIT (UINT32_MAX / (8 * sizeof(cdf_property_info_t)))
static const void *
cdf_offset(const void *p, size_t l)
{
return CAST(const void *, CAST(const uint8_t *, p) + l);
}
static const uint8_t *
cdf_get_property_info_pos(const cdf_stream_t *sst, const cdf_header_t *h,
const uint8_t *p, const uint8_t *e, size_t i)
{
size_t tail = (i << 1) + 1;
size_t ofs;
const uint8_t *q;
if (p >= e) {
DPRINTF(("Past end %p < %p\n", e, p));
return NULL;
}
if (cdf_check_stream_offset(sst, h, p, (tail + 1) * sizeof(uint32_t),
__LINE__) == -1)
return NULL;
ofs = CDF_GETUINT32(p, tail);
q = CAST(const uint8_t *, cdf_offset(CAST(const void *, p),
ofs - 2 * sizeof(uint32_t)));
if (q < p) {
DPRINTF(("Wrapped around %p < %p\n", q, p));
return NULL;
}
if (q >= e) {
DPRINTF(("Ran off the end %p >= %p\n", q, e));
return NULL;
}
return q;
}
static cdf_property_info_t *
cdf_grow_info(cdf_property_info_t **info, size_t *maxcount, size_t incr)
{
cdf_property_info_t *inp;
size_t newcount = *maxcount + incr;
if (newcount > CDF_PROP_LIMIT) {
DPRINTF(("exceeded property limit %zu > %zu\n",
newcount, CDF_PROP_LIMIT));
goto out;
}
inp = CAST(cdf_property_info_t *,
CDF_REALLOC(*info, newcount * sizeof(*inp)));
if (inp == NULL)
goto out;
*info = inp;
*maxcount = newcount;
return inp;
out:
free(*info);
*maxcount = 0;
*info = NULL;
return NULL;
}
static int
cdf_copy_info(cdf_property_info_t *inp, const void *p, const void *e,
size_t len)
{
if (inp->pi_type & CDF_VECTOR)
return 0;
if ((size_t)(CAST(const char *, e) - CAST(const char *, p)) < len)
return 0;
(void)memcpy(&inp->pi_val, p, len);
switch (len) {
case 2:
inp->pi_u16 = CDF_TOLE2(inp->pi_u16);
break;
case 4:
inp->pi_u32 = CDF_TOLE4(inp->pi_u32);
break;
case 8:
inp->pi_u64 = CDF_TOLE8(inp->pi_u64);
break;
default:
abort();
}
return 1;
}
int
cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
uint32_t offs, cdf_property_info_t **info, size_t *count, size_t *maxcount)
@@ -836,92 +958,69 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
const cdf_section_header_t *shp;
cdf_section_header_t sh;
const uint8_t *p, *q, *e;
int16_t s16;
int32_t s32;
uint32_t u32;
int64_t s64;
uint64_t u64;
cdf_timestamp_t tp;
size_t i, o, o4, nelements, j;
size_t i, o4, nelements, j, slen, left;
cdf_property_info_t *inp;
if (offs > UINT32_MAX / 4) {
errno = EFTYPE;
goto out;
}
shp = CAST(const cdf_section_header_t *, (const void *)
((const char *)sst->sst_tab + offs));
shp = CAST(const cdf_section_header_t *,
cdf_offset(sst->sst_tab, offs));
if (cdf_check_stream_offset(sst, h, shp, sizeof(*shp), __LINE__) == -1)
goto out;
sh.sh_len = CDF_TOLE4(shp->sh_len);
#define CDF_SHLEN_LIMIT (UINT32_MAX / 8)
if (sh.sh_len > CDF_SHLEN_LIMIT) {
errno = EFTYPE;
goto out;
}
sh.sh_properties = CDF_TOLE4(shp->sh_properties);
#define CDF_PROP_LIMIT (UINT32_MAX / (4 * sizeof(*inp)))
if (sh.sh_properties > CDF_PROP_LIMIT)
if (cdf_check_stream_offset(sst, h, shp, sh.sh_len, __LINE__) == -1)
goto out;
sh.sh_properties = CDF_TOLE4(shp->sh_properties);
DPRINTF(("section len: %u properties %u\n", sh.sh_len,
sh.sh_properties));
if (*maxcount) {
if (*maxcount > CDF_PROP_LIMIT)
goto out;
*maxcount += sh.sh_properties;
inp = CAST(cdf_property_info_t *,
realloc(*info, *maxcount * sizeof(*inp)));
} else {
*maxcount = sh.sh_properties;
inp = CAST(cdf_property_info_t *,
malloc(*maxcount * sizeof(*inp)));
}
if (sh.sh_properties > CDF_PROP_LIMIT)
goto out;
inp = cdf_grow_info(info, maxcount, sh.sh_properties);
if (inp == NULL)
goto out1;
*info = inp;
goto out;
inp += *count;
*count += sh.sh_properties;
p = CAST(const uint8_t *, (const void *)
((const char *)(const void *)sst->sst_tab +
offs + sizeof(sh)));
e = CAST(const uint8_t *, (const void *)
(((const char *)(const void *)shp) + sh.sh_len));
if (cdf_check_stream_offset(sst, h, e, 0, __LINE__) == -1)
p = CAST(const uint8_t *, cdf_offset(sst->sst_tab, offs + sizeof(sh)));
e = CAST(const uint8_t *, cdf_offset(shp, sh.sh_len));
if (p >= e || cdf_check_stream_offset(sst, h, e, 0, __LINE__) == -1)
goto out;
for (i = 0; i < sh.sh_properties; i++) {
size_t tail = (i << 1) + 1;
size_t ofs;
if (cdf_check_stream_offset(sst, h, p, tail * sizeof(uint32_t),
__LINE__) == -1)
if ((q = cdf_get_property_info_pos(sst, h, p, e, i)) == NULL)
goto out;
ofs = CDF_GETUINT32(p, tail);
q = (const uint8_t *)(const void *)
((const char *)(const void *)p + ofs
- 2 * sizeof(uint32_t));
if (q < p) {
DPRINTF(("Wrapped around %p < %p\n", q, p));
goto out;
}
if (q > e) {
DPRINTF(("Ran of the end %p > %p\n", q, e));
goto out;
}
inp[i].pi_id = CDF_GETUINT32(p, i << 1);
left = CAST(size_t, e - q);
if (left < sizeof(uint32_t)) {
DPRINTF(("short info (no type)_\n"));
goto out;
}
inp[i].pi_type = CDF_GETUINT32(q, 0);
DPRINTF(("%" SIZE_T_FORMAT "u) id=%x type=%x offs=0x%tx,0x%x\n",
DPRINTF(("%" SIZE_T_FORMAT "u) id=%#x type=%#x offs=%#tx,%#x\n",
i, inp[i].pi_id, inp[i].pi_type, q - p, offs));
if (inp[i].pi_type & CDF_VECTOR) {
if (left < sizeof(uint32_t) * 2) {
DPRINTF(("missing CDF_VECTOR length\n"));
goto out;
}
nelements = CDF_GETUINT32(q, 1);
if (nelements == 0) {
DPRINTF(("CDF_VECTOR with nelements == 0\n"));
goto out;
}
o = 2;
slen = 2;
} else {
nelements = 1;
o = 1;
slen = 1;
}
o4 = o * sizeof(uint32_t);
o4 = slen * sizeof(uint32_t);
if (inp[i].pi_type & (CDF_ARRAY|CDF_BYREF|CDF_RESERVED))
goto unknown;
switch (inp[i].pi_type & CDF_TYPEMASK) {
@@ -929,109 +1028,83 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
case CDF_EMPTY:
break;
case CDF_SIGNED16:
if (inp[i].pi_type & CDF_VECTOR)
if (!cdf_copy_info(&inp[i], &q[o4], e, sizeof(int16_t)))
goto unknown;
(void)memcpy(&s16, &q[o4], sizeof(s16));
inp[i].pi_s16 = CDF_TOLE2(s16);
break;
case CDF_SIGNED32:
if (inp[i].pi_type & CDF_VECTOR)
goto unknown;
(void)memcpy(&s32, &q[o4], sizeof(s32));
inp[i].pi_s32 = CDF_TOLE4((uint32_t)s32);
break;
case CDF_BOOL:
case CDF_UNSIGNED32:
if (inp[i].pi_type & CDF_VECTOR)
case CDF_FLOAT:
if (!cdf_copy_info(&inp[i], &q[o4], e, sizeof(int32_t)))
goto unknown;
(void)memcpy(&u32, &q[o4], sizeof(u32));
inp[i].pi_u32 = CDF_TOLE4(u32);
break;
case CDF_SIGNED64:
if (inp[i].pi_type & CDF_VECTOR)
goto unknown;
(void)memcpy(&s64, &q[o4], sizeof(s64));
inp[i].pi_s64 = CDF_TOLE8((uint64_t)s64);
break;
case CDF_UNSIGNED64:
if (inp[i].pi_type & CDF_VECTOR)
goto unknown;
(void)memcpy(&u64, &q[o4], sizeof(u64));
inp[i].pi_u64 = CDF_TOLE8((uint64_t)u64);
break;
case CDF_FLOAT:
if (inp[i].pi_type & CDF_VECTOR)
goto unknown;
(void)memcpy(&u32, &q[o4], sizeof(u32));
u32 = CDF_TOLE4(u32);
memcpy(&inp[i].pi_f, &u32, sizeof(inp[i].pi_f));
break;
case CDF_DOUBLE:
if (inp[i].pi_type & CDF_VECTOR)
case CDF_FILETIME:
if (!cdf_copy_info(&inp[i], &q[o4], e, sizeof(int64_t)))
goto unknown;
(void)memcpy(&u64, &q[o4], sizeof(u64));
u64 = CDF_TOLE8((uint64_t)u64);
memcpy(&inp[i].pi_d, &u64, sizeof(inp[i].pi_d));
break;
case CDF_LENGTH32_STRING:
case CDF_LENGTH32_WSTRING:
if (nelements > 1) {
size_t nelem = inp - *info;
if (*maxcount > CDF_PROP_LIMIT
|| nelements > CDF_PROP_LIMIT)
goto out;
*maxcount += nelements;
inp = CAST(cdf_property_info_t *,
realloc(*info, *maxcount * sizeof(*inp)));
inp = cdf_grow_info(info, maxcount, nelements);
if (inp == NULL)
goto out1;
*info = inp;
inp = *info + nelem;
goto out;
inp += nelem;
}
DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n",
nelements));
for (j = 0; j < nelements && i < sh.sh_properties;
j++, i++)
{
uint32_t l = CDF_GETUINT32(q, o);
uint32_t l;
if (o4 + sizeof(uint32_t) > left)
goto out;
l = CDF_GETUINT32(q, slen);
o4 += sizeof(uint32_t);
if (o4 + l > left)
goto out;
inp[i].pi_str.s_len = l;
inp[i].pi_str.s_buf = (const char *)
(const void *)(&q[o4 + sizeof(l)]);
DPRINTF(("l = %d, r = %" SIZE_T_FORMAT
"u, s = %s\n", l,
CDF_ROUND(l, sizeof(l)),
inp[i].pi_str.s_buf = CAST(const char *,
CAST(const void *, &q[o4]));
DPRINTF(("o=%zu l=%d(%" SIZE_T_FORMAT
"u), t=%zu s=%s\n", o4, l,
CDF_ROUND(l, sizeof(l)), left,
inp[i].pi_str.s_buf));
if (l & 1)
l++;
o += l >> 1;
if (q + o >= e)
goto out;
o4 = o * sizeof(uint32_t);
slen += l >> 1;
o4 = slen * sizeof(uint32_t);
}
i--;
break;
case CDF_FILETIME:
if (inp[i].pi_type & CDF_VECTOR)
goto unknown;
(void)memcpy(&tp, &q[o4], sizeof(tp));
inp[i].pi_tp = CDF_TOLE8((uint64_t)tp);
break;
case CDF_CLIPBOARD:
if (inp[i].pi_type & CDF_VECTOR)
goto unknown;
break;
default:
unknown:
DPRINTF(("Don't know how to deal with %x\n",
memset(&inp[i].pi_val, 0, sizeof(inp[i].pi_val));
DPRINTF(("Don't know how to deal with %#x\n",
inp[i].pi_type));
break;
}
}
return 0;
out:
errno = EFTYPE;
out1:
free(*info);
*info = NULL;
*count = 0;
*maxcount = 0;
errno = EFTYPE;
return -1;
}
@@ -1079,7 +1152,7 @@ cdf_unpack_catalog(const cdf_header_t *h, const cdf_stream_t *sst,
{
size_t ss = cdf_check_stream(sst, h);
const char *b = CAST(const char *, sst->sst_tab);
const char *eb = b + ss * sst->sst_len;
const char *nb, *eb = b + ss * sst->sst_len;
size_t nr, i, j, k;
cdf_catalog_entry_t *ce;
uint16_t reclen;
@@ -1098,7 +1171,7 @@ cdf_unpack_catalog(const cdf_header_t *h, const cdf_stream_t *sst,
return -1;
nr--;
*cat = CAST(cdf_catalog_t *,
malloc(sizeof(cdf_catalog_t) + nr * sizeof(*ce)));
CDF_MALLOC(sizeof(cdf_catalog_t) + nr * sizeof(*ce)));
if (*cat == NULL)
return -1;
ce = (*cat)->cat_e;
@@ -1124,7 +1197,9 @@ cdf_unpack_catalog(const cdf_header_t *h, const cdf_stream_t *sst,
cep->ce_namlen = rlen;
np = CAST(const uint16_t *, CAST(const void *, (b + 16)));
if (RCAST(const char *, np + cep->ce_namlen) > eb) {
nb = CAST(const char *, CAST(const void *,
(np + cep->ce_namlen)));
if (nb > eb) {
cep->ce_namlen = 0;
break;
}
@@ -1183,7 +1258,7 @@ cdf_print_property_name(char *buf, size_t bufsiz, uint32_t p)
for (i = 0; i < __arraycount(vn); i++)
if (vn[i].v == p)
return snprintf(buf, bufsiz, "%s", vn[i].n);
return snprintf(buf, bufsiz, "0x%x", p);
return snprintf(buf, bufsiz, "%#x", p);
}
int
@@ -1242,7 +1317,7 @@ cdf_dump_header(const cdf_header_t *h)
h->h_ ## b, 1 << h->h_ ## b)
DUMP("%d", revision);
DUMP("%d", version);
DUMP("0x%x", byte_order);
DUMP("%#x", byte_order);
DUMP2("%d", sec_size_p2);
DUMP2("%d", short_sec_size_p2);
DUMP("%d", num_sectors_in_sat);
@@ -1336,7 +1411,7 @@ cdf_dump_dir(const cdf_info_t *info, const cdf_header_t *h,
d->d_color ? "black" : "red");
(void)fprintf(stderr, "Left child: %d\n", d->d_left_child);
(void)fprintf(stderr, "Right child: %d\n", d->d_right_child);
(void)fprintf(stderr, "Flags: 0x%x\n", d->d_flags);
(void)fprintf(stderr, "Flags: %#x\n", d->d_flags);
cdf_timestamp_to_timespec(&ts, d->d_created);
(void)fprintf(stderr, "Created %s", cdf_ctime(&ts.tv_sec, buf));
cdf_timestamp_to_timespec(&ts, d->d_modified);
@@ -1429,7 +1504,7 @@ cdf_dump_property_info(const cdf_property_info_t *info, size_t count)
(void)fprintf(stderr, "CLIPBOARD %u\n", info[i].pi_u32);
break;
default:
DPRINTF(("Don't know how to deal with %x\n",
DPRINTF(("Don't know how to deal with %#x\n",
info[i].pi_type));
break;
}
@@ -1448,7 +1523,7 @@ cdf_dump_summary_info(const cdf_header_t *h, const cdf_stream_t *sst)
(void)&h;
if (cdf_unpack_summary_info(sst, h, &ssi, &info, &count) == -1)
return;
(void)fprintf(stderr, "Endian: %x\n", ssi.si_byte_order);
(void)fprintf(stderr, "Endian: %#x\n", ssi.si_byte_order);
(void)fprintf(stderr, "Os Version %d.%d\n", ssi.si_os_version & 0xff,
ssi.si_os_version >> 8);
(void)fprintf(stderr, "Os %d\n", ssi.si_os);
+3 -3
View File
@@ -129,9 +129,9 @@ typedef struct {
typedef struct {
void *sst_tab;
size_t sst_len;
size_t sst_dirlen;
size_t sst_ss;
size_t sst_len; /* Number of sectors */
size_t sst_dirlen; /* Directory sector size */
size_t sst_ss; /* Sector size */
} cdf_stream_t;
typedef struct {
+2 -2
View File
@@ -27,7 +27,7 @@
#include "file.h"
#ifndef lint
FILE_RCSID("@(#)$File: cdf_time.c,v 1.15 2014/05/14 23:15:42 christos Exp $")
FILE_RCSID("@(#)$File: cdf_time.c,v 1.16 2017/03/29 15:57:48 christos Exp $")
#endif
#include <time.h>
@@ -172,7 +172,7 @@ cdf_ctime(const time_t *sec, char *buf)
char *ptr = ctime_r(sec, buf);
if (ptr != NULL)
return buf;
(void)snprintf(buf, 26, "*Bad* 0x%16.16" INT64_T_FORMAT "x\n",
(void)snprintf(buf, 26, "*Bad* %#16.16" INT64_T_FORMAT "x\n",
(long long)*sec);
return buf;
}
+4 -4
View File
@@ -35,7 +35,7 @@
#include "file.h"
#ifndef lint
FILE_RCSID("@(#)$File: compress.c,v 1.100 2016/10/24 18:02:17 christos Exp $")
FILE_RCSID("@(#)$File: compress.c,v 1.104 2017/03/29 15:57:48 christos Exp $")
#endif
#include "magic.h"
@@ -458,7 +458,7 @@ uncompresszlib(const unsigned char *old, unsigned char **newch,
z.next_in = CCAST(Bytef *, old);
z.avail_in = CAST(uint32_t, *n);
z.next_out = *newch;
z.avail_out = bytes_max;
z.avail_out = CAST(unsigned int, bytes_max);
z.zalloc = Z_NULL;
z.zfree = Z_NULL;
z.opaque = Z_NULL;
@@ -593,7 +593,7 @@ filter_error(unsigned char *ubuf, ssize_t n)
while (isspace((unsigned char)*p))
p++;
n = strlen(p);
memmove(ubuf, p, n + 1);
memmove(ubuf, p, CAST(size_t, n + 1));
}
DPRINTF("Filter error after[[[%s]]]\n", (char *)ubuf);
if (islower(*ubuf))
@@ -649,7 +649,7 @@ uncompressbuf(int fd, size_t bytes_max, size_t method, const unsigned char *old,
}
for (i = 0; i < __arraycount(fdp); i++)
copydesc(i, fdp[i]);
copydesc(CAST(int, i), fdp[i]);
(void)execvp(compr[method].argv[0],
(char *const *)(intptr_t)compr[method].argv);
+31 -13
View File
@@ -35,7 +35,7 @@
#include "file.h"
#ifndef lint
FILE_RCSID("@(#)$File: der.c,v 1.10 2016/10/24 18:02:17 christos Exp $")
FILE_RCSID("@(#)$File: der.c,v 1.12 2017/02/10 18:14:01 christos Exp $")
#endif
#endif
@@ -161,31 +161,49 @@ gettag(const uint8_t *c, size_t *p, size_t l)
return tag;
}
/*
* Read the length of a DER tag from the input.
*
* `c` is the input, `p` is an output parameter that specifies how much of the
* input we consumed, and `l` is the maximum input length.
*
* Returns the length, or DER_BAD if the end of the input is reached or the
* length exceeds the remaining input.
*/
static uint32_t
getlength(const uint8_t *c, size_t *p, size_t l)
{
uint8_t digits, i;
size_t len;
int is_onebyte_result;
if (*p >= l)
return DER_BAD;
digits = c[(*p)++];
if ((digits & 0x80) == 0)
return digits;
digits &= 0x7f;
len = 0;
/*
* Digits can either be 0b0 followed by the result, or 0b1
* followed by the number of digits of the result. In either case,
* we verify that we can read so many bytes from the input.
*/
is_onebyte_result = (c[*p] & 0x80) == 0;
digits = c[(*p)++] & 0x7f;
if (*p + digits >= l)
return DER_BAD;
if (is_onebyte_result)
return digits;
/*
* Decode len. We've already verified that we're allowed to read
* `digits` bytes.
*/
len = 0;
for (i = 0; i < digits; i++)
len = (len << 8) | c[(*p)++];
if (*p + len >= l)
return DER_BAD;
return len;
return CAST(uint32_t, len);
}
static const char *
@@ -245,12 +263,12 @@ der_offs(struct magic_set *ms, struct magic *m, size_t nbytes)
#endif
if (m->cont_level != 0) {
if (offs + tlen > nbytes)
return DER_BAD;
ms->c.li[m->cont_level - 1].off = offs + tlen;
return -1;
ms->c.li[m->cont_level - 1].off = CAST(int, offs + tlen);
DPRINTF(("cont_level[%u] = %u\n", m->cont_level - 1,
ms->c.li[m->cont_level - 1].off));
}
return offs;
return CAST(int32_t, offs);
}
int
+5 -1
View File
@@ -27,7 +27,7 @@
*/
/*
* file.h - definitions for file(1) program
* @(#)$File: file.h,v 1.180 2016/07/20 11:27:08 christos Exp $
* @(#)$File: file.h,v 1.182 2017/04/07 19:46:44 christos Exp $
*/
#ifndef __file_h__
@@ -553,7 +553,11 @@ static const char *rcsid(const char *p) { \
#endif
#ifdef PHP_WIN32
#ifdef _WIN64
#define FINFO_LSEEK_FUNC _lseeki64
#else
#define FINFO_LSEEK_FUNC _lseek
#endif
#define FINFO_READ_FUNC _read
#else
#define FINFO_LSEEK_FUNC lseek
+1 -2
View File
@@ -27,7 +27,7 @@
#include "file.h"
#ifndef lint
FILE_RCSID("@(#)$File: funcs.c,v 1.90 2016/10/19 20:51:17 christos Exp $")
FILE_RCSID("@(#)$File: funcs.c,v 1.92 2017/04/07 20:10:24 christos Exp $")
#endif /* lint */
#include "magic.h"
@@ -61,7 +61,6 @@ extern public void convert_libmagic_pattern(zval *pattern, char *val, int len, i
protected int
file_printf(struct magic_set *ms, const char *fmt, ...)
{
int rv;
va_list ap;
int len;
char *buf = NULL, *newstr;
+22 -15
View File
@@ -40,7 +40,7 @@
#include "file.h"
#ifndef lint
FILE_RCSID("@(#)$File: is_tar.c,v 1.38 2015/04/09 20:01:41 christos Exp $")
FILE_RCSID("@(#)$File: is_tar.c,v 1.39 2017/03/17 20:45:01 christos Exp $")
#endif
#include "magic.h"
@@ -51,7 +51,7 @@ FILE_RCSID("@(#)$File: is_tar.c,v 1.38 2015/04/09 20:01:41 christos Exp $")
#define isodigit(c) ( ((c) >= '0') && ((c) <= '7') )
private int is_tar(const unsigned char *, size_t);
private int from_oct(int, const char *); /* Decode octal number */
private int from_oct(const char *, size_t); /* Decode octal number */
static const char tartype[][32] = {
"tar archive",
@@ -93,31 +93,35 @@ private int
is_tar(const unsigned char *buf, size_t nbytes)
{
const union record *header = (const union record *)(const void *)buf;
int i;
int sum, recsum;
const unsigned char *p;
size_t i;
int sum, recsum;
const unsigned char *p, *ep;
if (nbytes < sizeof(union record))
if (nbytes < sizeof(*header))
return 0;
recsum = from_oct(8, header->header.chksum);
recsum = from_oct(header->header.chksum, sizeof(header->header.chksum));
sum = 0;
p = header->charptr;
for (i = sizeof(union record); --i >= 0;)
ep = header->charptr + sizeof(*header);
while (p < ep)
sum += *p++;
/* Adjust checksum to count the "chksum" field as blanks. */
for (i = sizeof(header->header.chksum); --i >= 0;)
for (i = 0; i < sizeof(header->header.chksum); i++)
sum -= header->header.chksum[i];
sum += ' ' * sizeof header->header.chksum;
sum += ' ' * sizeof(header->header.chksum);
if (sum != recsum)
return 0; /* Not a tar archive */
if (strcmp(header->header.magic, GNUTMAGIC) == 0)
if (strncmp(header->header.magic, GNUTMAGIC,
sizeof(header->header.magic)) == 0)
return 3; /* GNU Unix Standard tar archive */
if (strcmp(header->header.magic, TMAGIC) == 0)
if (strncmp(header->header.magic, TMAGIC,
sizeof(header->header.magic)) == 0)
return 2; /* Unix Standard tar archive */
return 1; /* Old fashioned tar archive */
@@ -130,19 +134,22 @@ is_tar(const unsigned char *buf, size_t nbytes)
* Result is -1 if the field is invalid (all blank, or non-octal).
*/
private int
from_oct(int digs, const char *where)
from_oct(const char *where, size_t digs)
{
int value;
if (digs == 0)
return -1;
while (isspace((unsigned char)*where)) { /* Skip spaces */
where++;
if (--digs <= 0)
if (digs-- == 0)
return -1; /* All blank field */
}
value = 0;
while (digs > 0 && isodigit(*where)) { /* Scan til non-octal */
value = (value << 3) | (*where++ - '0');
--digs;
digs--;
}
if (digs > 0 && *where && !isspace((unsigned char)*where))
+1 -5
View File
@@ -40,11 +40,7 @@ FILE_RCSID("@(#)$File: magic.c,v 1.100 2016/07/18 11:43:05 christos Exp $")
#include <unistd.h>
#endif
#include <string.h>
#ifdef PHP_WIN32
# include "config.w32.h"
#else
# include "php_config.h"
#endif
#include "config.h"
#ifdef PHP_WIN32
#include <shlwapi.h>
+1 -1
View File
@@ -80,7 +80,7 @@
#define MAGIC_NO_CHECK_FORTRAN 0x000000 /* Don't check ascii/fortran */
#define MAGIC_NO_CHECK_TROFF 0x000000 /* Don't check ascii/troff */
#define MAGIC_VERSION 529 /* This implementation */
#define MAGIC_VERSION 531 /* This implementation */
#ifdef __cplusplus
+5 -1
View File
@@ -1,11 +1,15 @@
#define FILE_VERSION_MAJOR 5
#define patchlevel 29
#define patchlevel 31
/*
* Patchlevel file for Ian Darwin's MAGIC command.
* $File: patchlevel.h,v 1.68 2008/03/22 21:39:43 christos Exp $
*
* $Log$
* Revision 2.0 2017/10/11 22:27:12 ab
* Update libmagic to 5.31
*
* $Log$
* Revision 1.9 2016/11/24 22:27:12 ab
* Update libmagic to 5.29
*
+1 -1
View File
@@ -34,7 +34,7 @@
#include "file.h"
#ifndef lint
FILE_RCSID("@(#)$File: print.c,v 1.81 2016/01/19 15:09:03 christos Exp $")
FILE_RCSID("@(#)$File: print.c,v 1.82 2017/02/10 18:14:01 christos Exp $")
#endif /* lint */
#include <string.h>
+6 -4
View File
@@ -26,7 +26,7 @@
#include "file.h"
#ifndef lint
FILE_RCSID("@(#)$File: readcdf.c,v 1.63 2016/10/18 22:25:42 christos Exp $")
FILE_RCSID("@(#)$File: readcdf.c,v 1.65 2017/04/08 20:58:03 christos Exp $")
#endif
#include <assert.h>
@@ -140,7 +140,7 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info,
struct timeval ts;
char buf[64];
const char *str = NULL;
const char *s;
const char *s, *e;
int len;
memset(&ts, 0, sizeof(ts));
@@ -189,7 +189,9 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info,
if (info[i].pi_type == CDF_LENGTH32_WSTRING)
k++;
s = info[i].pi_str.s_buf;
for (j = 0; j < sizeof(vbuf) && len--; s += k) {
e = info[i].pi_str.s_buf + len;
for (j = 0; s < e && j < sizeof(vbuf)
&& len--; s += k) {
if (*s == '\0')
break;
if (isprint((unsigned char)*s))
@@ -596,7 +598,7 @@ file_trycdf(struct magic_set *ms, int fd, const unsigned char *buf,
if ((i = cdf_read_user_stream(&info, &h, &sat, &ssat, &sst, &dir,
"FileHeader", &scn)) != -1) {
#define HWP5_SIGNATURE "HWP Document File"
if (scn.sst_dirlen >= sizeof(HWP5_SIGNATURE) - 1
if (scn.sst_len * scn.sst_ss >= sizeof(HWP5_SIGNATURE) - 1
&& memcmp(scn.sst_tab, HWP5_SIGNATURE,
sizeof(HWP5_SIGNATURE) - 1) == 0) {
if (NOTMIME(ms)) {
+18 -18
View File
@@ -32,7 +32,7 @@
#include "file.h"
#ifndef lint
FILE_RCSID("@(#)$File: softmagic.c,v 1.238 2016/10/24 18:02:17 christos Exp $")
FILE_RCSID("@(#)$File: softmagic.c,v 1.248 2017/04/21 16:54:57 christos Exp $")
#endif /* lint */
#include "magic.h"
@@ -198,6 +198,7 @@ flush:
while (magindex < nmagic - 1 &&
magic[magindex + 1].cont_level != 0)
magindex++;
cont_level = 0;
continue; /* Skip to next top-level test*/
}
@@ -376,6 +377,7 @@ flush:
case -1:
case 0:
flush = 1;
cont_level--;
break;
default:
break;
@@ -1015,9 +1017,8 @@ private int
mconvert(struct magic_set *ms, struct magic *m, int flip)
{
union VALUETYPE *p = &ms->ms_value;
uint8_t type;
switch (type = cvt_flip(m->type, flip)) {
switch (cvt_flip(m->type, flip)) {
case FILE_BYTE:
if (cvt_8(p, m) == -1)
goto out;
@@ -1182,7 +1183,7 @@ mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir,
case FILE_DER:
case FILE_SEARCH:
if (offset > nbytes)
offset = nbytes;
offset = CAST(uint32_t, nbytes);
ms->search.s = RCAST(const char *, s) + offset;
ms->search.s_len = nbytes - offset;
ms->search.offset = offset;
@@ -1265,7 +1266,8 @@ mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir,
if (*dst == '\0') {
if (type == FILE_BESTRING16 ?
*(src - 1) != '\0' :
*(src + 1) != '\0')
((src + 1 < esrc) &&
*(src + 1) != '\0'))
*dst = ' ';
}
}
@@ -1370,7 +1372,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
return -1;
if ((ms->flags & MAGIC_DEBUG) != 0) {
fprintf(stderr, "mget(type=%d, flag=%x, offset=%u, o=%"
fprintf(stderr, "mget(type=%d, flag=%#x, offset=%u, o=%"
SIZE_T_FORMAT "u, " "nbytes=%" SIZE_T_FORMAT
"u, il=%hu, nc=%hu)\n",
m->type, m->flag, offset, o, nbytes,
@@ -1631,6 +1633,7 @@ file_strncmp(const char *s1, const char *s2, size_t len, uint32_t flags)
*/
const unsigned char *a = (const unsigned char *)s1;
const unsigned char *b = (const unsigned char *)s2;
const unsigned char *eb = b + len;
uint64_t v;
/*
@@ -1645,6 +1648,10 @@ file_strncmp(const char *s1, const char *s2, size_t len, uint32_t flags)
}
else { /* combine the others */
while (len-- > 0) {
if (b >= eb) {
v = 1;
break;
}
if ((flags & STRING_IGNORE_LOWERCASE) &&
islower(*a)) {
if ((v = tolower(*b++) - *a++) != '\0')
@@ -1659,14 +1666,9 @@ file_strncmp(const char *s1, const char *s2, size_t len, uint32_t flags)
isspace(*a)) {
a++;
if (isspace(*b++)) {
if (!isspace(*a)) {
/* Limit to the remaining len only, otherwise
we risk to cause CVE-2014-3538. This
might be done better though, not sure. */
size_t remaining_len = len;
while (isspace(*b) && remaining_len-- > 0)
if (!isspace(*a))
while (b < eb && isspace(*b))
b++;
}
}
else {
v = 1;
@@ -1675,10 +1677,8 @@ file_strncmp(const char *s1, const char *s2, size_t len, uint32_t flags)
}
else if ((flags & STRING_COMPACT_OPTIONAL_WHITESPACE) &&
isspace(*a)) {
/* Same as the comment in the previous elif clause. */
size_t remaining_len = len;
a++;
while (isspace(*b)&& remaining_len-- > 0)
while (b < eb && isspace(*b))
b++;
}
else {
@@ -1884,13 +1884,13 @@ magiccheck(struct magic_set *ms, struct magic *m)
for (idx = 0; m->str_range == 0 || idx < m->str_range; idx++) {
if (slen + idx > ms->search.s_len)
break;
return 0;
v = file_strncmp(m->value.s, ms->search.s + idx, slen,
m->str_flags);
if (v == 0) { /* found match */
ms->search.offset += idx;
ms->search.rm_len = m->str_range - idx;
ms->search.rm_len = ms->search.s_len - idx;
break;
}
}
+148 -198
View File
@@ -1,9 +1,6 @@
Patches applied to file 5.17 sources tree before generating magic.mgc
and before running create_data_file.php to create data_file.c.
diff -u magic/Magdir.orig.0/cafebabe magic/Magdir/cafebabe
--- magic/Magdir.orig.0/cafebabe 2015-10-16 00:54:18.000000000 +0000
+++ magic/Magdir/cafebabe 2016-11-24 15:59:25.553060242 +0000
diff -u file-5.31.orig/magic/Magdir/cafebabe file-5.31/magic/Magdir/cafebabe
--- file-5.31.orig/magic/Magdir/cafebabe 2017-03-17 21:35:28.000000000 +0000
+++ file-5.31/magic/Magdir/cafebabe 2017-10-11 14:30:57.476077825 +0000
@@ -15,22 +15,6 @@
# might add another one or two as time goes by...
#
@@ -60,29 +57,41 @@ diff -u magic/Magdir.orig.0/cafebabe magic/Magdir/cafebabe
>>>48 use mach-o \b
>>4 belong 4
>>>68 use mach-o \b
diff -u magic/Magdir.orig.0/commands magic/Magdir/commands
--- magic/Magdir.orig.0/commands 2016-07-14 19:01:12.000000000 +0000
+++ magic/Magdir/commands 2016-11-24 15:59:25.557060441 +0000
diff -u file-5.31.orig/magic/Magdir/commands file-5.31/magic/Magdir/commands
--- file-5.31.orig/magic/Magdir/commands 2017-04-04 20:34:24.000000000 +0000
+++ file-5.31/magic/Magdir/commands 2017-10-11 14:29:57.653552987 +0000
@@ -56,7 +56,7 @@
!:mime text/x-awk
0 string/wt #!\ /usr/bin/awk awk script text executable
!:mime text/x-awk
-0 regex/4096 =^\\s{0,100}BEGIN\\s{0,100}[{] awk or perl script text
+0 regex/4096 =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
-0 regex/4096 =^[A-Za-z0-9_]{0,100}BEGIN[A-Za-z0-9_]{0,100}[{] awk or perl script text
+0 regex/4096 =^[\040\t\f\r\n]{0,100}BEGIN[\040\t\f\r\n]{0,100}[{] awk or perl script text
# AT&T Bell Labs' Plan 9 shell
0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
diff -u magic/Magdir.orig.0/filesystems magic/Magdir/filesystems
--- magic/Magdir.orig.0/filesystems 2016-09-05 08:34:25.000000000 +0000
+++ magic/Magdir/filesystems 2016-11-24 15:59:25.553060242 +0000
diff -u file-5.31.orig/magic/Magdir/dump file-5.31/magic/Magdir/dump
--- file-5.31.orig/magic/Magdir/dump 2017-03-17 21:35:28.000000000 +0000
+++ file-5.31/magic/Magdir/dump 2017-10-11 14:30:09.622057792 +0000
@@ -69,6 +69,8 @@
>0 use old-dump-be
24 lelong 60012 new-fs dump file (little endian),
+# to correctly recognize '*.mo' GNU message catalog (little endian)
+!:strength - 15
>0 use \^new-dump-be
24 lelong 60011 old-fs dump file (little endian),
diff -u file-5.31.orig/magic/Magdir/filesystems file-5.31/magic/Magdir/filesystems
--- file-5.31.orig/magic/Magdir/filesystems 2017-03-24 19:29:26.000000000 +0000
+++ file-5.31/magic/Magdir/filesystems 2017-10-11 14:30:57.476077825 +0000
@@ -254,7 +254,7 @@
30 search/481 \x55\xAA
30 search/481 \x55\xAA
# to display DOS/MBR boot sector (40) before old one (strength=50+21),Syslinux bootloader (71),SYSLINUX MBR (37+36),NetBSD mbr (110),AdvanceMAME mbr (111)
# DOS BPB information (70) and after DOS floppy (120) like in previous file version
-!:strength +65
+!:strength +0
# for sector sizes < 512 Bytes
>11 uleshort <512
>11 uleshort <512
>>(11.s-2) uleshort 0xAA55 DOS/MBR boot sector
@@ -266,7 +266,7 @@
0x1FE leshort 0xAA55 DOS/MBR boot sector
@@ -93,191 +102,74 @@ diff -u magic/Magdir.orig.0/filesystems magic/Magdir/filesystems
>2 string OSBS OS/BS MBR
# added by Joerg Jenderek at Feb 2013 according to http://thestarman.pcministry.com/asm/mbr/
# and http://en.wikipedia.org/wiki/Master_Boot_Record
diff -u magic/Magdir.orig.0/msdos magic/Magdir/msdos
--- magic/Magdir.orig.0/msdos 2016-09-14 01:26:26.000000000 +0000
+++ magic/Magdir/msdos 2016-11-24 15:58:56.327609010 +0000
@@ -404,7 +404,7 @@
# GRR: line below too general as it catches also
# rt.lib DYADISKS.PIC and many more
# start with assembler instruction MOV
-0 ubyte 0x8c
+#0 ubyte 0x8c
# skip "AppleWorks word processor data" like ARTICLE.1 ./apple
>4 string !O====
# skip some unknown basic binaries like RocketRnger.SHR
@@ -428,17 +428,17 @@
# updated by Joerg Jenderek at Oct 2008
0 ulelong 0xffff10eb DR-DOS executable (COM)
# byte 0xeb conflicts with "sequent" magic leshort 0xn2eb
-0 ubeshort&0xeb8d >0xeb00
+#0 ubeshort&0xeb8d >0xeb00
# DR-DOS STACKER.COM SCREATE.SYS missed
Only in file-5.31/magic/Magdir/: gconv
diff -u file-5.31.orig/magic/Magdir/images file-5.31/magic/Magdir/images
--- file-5.31.orig/magic/Magdir/images 2017-04-04 20:34:24.000000000 +0000
+++ file-5.31/magic/Magdir/images 2017-10-11 14:29:57.653552987 +0000
@@ -175,42 +175,42 @@
>>>&0 regex =[0-9]{1,50} \b %s
0 name msdos-com
>0 byte x DOS executable (COM)
>6 string SFX\ of\ LHarc \b, %s
->0x1FE leshort 0xAA55 \b, boot code
->85 string UPX \b, UPX compressed
->4 string \ $ARX \b, ARX self-extracting archive
->4 string \ $LHarc \b, LHarc self-extracting archive
->0x20e string SFX\ by\ LARC \b, LARC self-extracting archive
+#>0x1FE leshort 0xAA55 \b, boot code
+#>85 string UPX \b, UPX compressed
+#>4 string \ $ARX \b, ARX self-extracting archive
+#>4 string \ $LHarc \b, LHarc self-extracting archive
+#>0x20e string SFX\ by\ LARC \b, LARC self-extracting archive
0 search/1 P1
->0 regex/4 P1[A-Za-z0-9_]
+>0 regex/4 P1[\040\t\f\r\n]
>>0 use netpbm
>>>0 string x \b, bitmap
!:strength + 45
!:mime image/x-portable-bitmap
# JMP 8bit
0 byte 0xeb
@@ -508,27 +508,27 @@
# GRR search is not working
#2 search/28 \xcd\x21 COM executable for MS-DOS
#WHICHFAT.cOM
-2 string \xcd\x21 COM executable for DOS
+#2 string \xcd\x21 COM executable for DOS
#DELTREE.cOM DELTREE2.cOM
-4 string \xcd\x21 COM executable for DOS
+#4 string \xcd\x21 COM executable for DOS
#IFMEMDSK.cOM ASSIGN.cOM COMP.cOM
-5 string \xcd\x21 COM executable for DOS
+#5 string \xcd\x21 COM executable for DOS
#DELTMP.COm HASFAT32.cOM
-7 string \xcd\x21
->0 byte !0xb8 COM executable for DOS
+#7 string \xcd\x21
+#>0 byte !0xb8 COM executable for DOS
#COMP.cOM MORE.COm
-10 string \xcd\x21
->5 string !\xcd\x21 COM executable for DOS
+#10 string \xcd\x21
+#>5 string !\xcd\x21 COM executable for DOS
#comecho.com
-13 string \xcd\x21 COM executable for DOS
+#13 string \xcd\x21 COM executable for DOS
#HELP.COm EDIT.coM
-18 string \xcd\x21 COM executable for MS-DOS
+#18 string \xcd\x21 COM executable for MS-DOS
#NWRPLTRM.COm
-23 string \xcd\x21 COM executable for MS-DOS
+#23 string \xcd\x21 COM executable for MS-DOS
#LOADFIX.cOm LOADFIX.cOm
-30 string \xcd\x21 COM executable for MS-DOS
+#30 string \xcd\x21 COM executable for MS-DOS
#syslinux.com 3.11
-70 string \xcd\x21 COM executable for DOS
+#70 string \xcd\x21 COM executable for DOS
# many compressed/converted COMs start with a copy loop instead of a jump
0x6 search/0xa \xfc\x57\xf3\xa5\xc3 COM executable for MS-DOS
0x6 search/0xa \xfc\x57\xf3\xa4\xc3 COM executable for DOS
diff -u magic/Magdir.orig.0/perl magic/Magdir/perl
--- magic/Magdir.orig.0/perl 2016-06-12 16:50:16.000000000 +0000
+++ magic/Magdir/perl 2016-11-24 15:59:25.553060242 +0000
@@ -7,40 +7,54 @@
# Send additions to <perl5-porters@perl.org>
0 search/1024 eval\ "exec\ perl Perl script text
!:mime text/x-perl
+!:strength + 30
0 search/1024 eval\ "exec\ /bin/perl Perl script text
!:mime text/x-perl
+!:strength + 30
0 search/1024 eval\ "exec\ /usr/bin/perl Perl script text
!:mime text/x-perl
+!:strength + 30
0 search/1024 eval\ "exec\ /usr/local/bin/perl Perl script text
!:mime text/x-perl
+!:strength + 30
0 search/1024 eval\ 'exec\ perl Perl script text
!:mime text/x-perl
+!:strength + 30
0 search/1024 eval\ 'exec\ /bin/perl Perl script text
!:mime text/x-perl
+!:strength + 30
0 search/1024 eval\ 'exec\ /usr/bin/perl Perl script text
!:mime text/x-perl
+!:strength + 30
0 search/1024 eval\ 'exec\ /usr/local/bin/perl Perl script text
!:mime text/x-perl
+!:strength + 30
0 search/1024 eval\ '(exit\ $?0)'\ &&\ eval\ 'exec Perl script text
!:mime text/x-perl
+!:strength + 1
0 string #!/usr/bin/env\ perl Perl script text executable
!:mime text/x-perl
+!:strength + 30
0 string #!\ /usr/bin/env\ perl Perl script text executable
!:mime text/x-perl
+!:strength + 30
0 string #!
>0 regex \^#!.*/bin/perl([[:space:]].*)*$ Perl script text executable
!:mime text/x-perl
+!:strength + 30
0 search/1 P2
->0 regex/4 P2[A-Za-z0-9_]
+>0 regex/4 P2[\040\t\f\r\n]
>>0 use netpbm
>>>0 string x \b, greymap
!:strength + 45
!:mime image/x-portable-greymap
# by Dmitry V. Levin and Alexey Tourbin
# check the first line
0 search/1024 package
>0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *; Perl5 module source text
+!:mime text/x-perl
!:strength + 10
# not 'p', check other lines
0 search/1024 !p
>0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *;
>>0 regex \^1\ *;|\^(use|sub|my)\ .*[(;{=] Perl5 module source text
-!:strength + 10
+!:mime text/x-perl
+!:strength + 40
0 search/1 P3
->0 regex/4 P3[A-Za-z0-9_]
+>0 regex/4 P3[\040\t\f\r\n]
>>0 use netpbm
>>>0 string x \b, pixmap
!:strength + 45
!:mime image/x-portable-pixmap
# Perl POD documents
# From: Tom Hukins <tom@eborcom.com>
diff -u magic/Magdir.orig.0/python magic/Magdir/python
--- magic/Magdir.orig.0/python 2016-09-16 12:06:13.000000000 +0000
+++ magic/Magdir/python 2016-11-24 15:59:25.549060044 +0000
@@ -43,20 +43,24 @@
# from module.submodule import func1, func2
0 regex \^from\\s+(\\w|\\.)+\\s+import.*$ Python script text executable
!:mime text/x-python
+!:strength + 15
0 string P4
->0 regex/4 P4[A-Za-z0-9_]
+>0 regex/4 P4[\040\t\f\r\n]
>>0 use netpbm
>>>0 string x \b, rawbits, bitmap
!:strength + 45
!:mime image/x-portable-bitmap
# def __init__ (self, ...):
0 search/4096 def\ __init__
>&0 search/64 self Python script text executable
!:mime text/x-python
+!:strength + 15
0 string P5
->0 regex/4 P5[A-Za-z0-9_]
+>0 regex/4 P5[\040\t\f\r\n]
>>0 use netpbm
>>>0 string x \b, rawbits, greymap
!:strength + 45
!:mime image/x-portable-greymap
# comments
-#0 search/4096 '''
-#>&0 regex .*'''$ Python script text executable
-#!:mime text/x-python
+0 search/4096 '''
+>&0 regex .*'''$ Python script text executable
+!:mime text/x-python
+!:strength + 15
-#0 search/4096 """
-#>&0 regex .*"""$ Python script text executable
-#!:mime text/x-python
+0 search/4096 """
+>&0 regex .*"""$ Python script text executable
+!:mime text/x-python
+!:strength + 15
# try:
0 string P6
->0 regex/4 P6[A-Za-z0-9_]
+>0 regex/4 P6[\040\t\f\r\n]
>>0 use netpbm
>>>0 string x \b, rawbits, pixmap
!:strength + 45
diff -u file-5.31.orig/magic/Magdir/python file-5.31/magic/Magdir/python
--- file-5.31.orig/magic/Magdir/python 2017-05-08 18:10:13.000000000 +0000
+++ file-5.31/magic/Magdir/python 2017-10-11 14:29:57.653552987 +0000
@@ -64,7 +64,7 @@
# except: or finally:
@@ -66,8 +70,10 @@
# block
0 search/4096 try:
->&0 regex \^[A-Za-z0-9_]*except.*: Python script text executable
+>&0 regex \^[\040\t\f\r\n]*except.*: Python script text executable
!:strength + 15
!:mime text/x-python
>&0 search/4096 finally: Python script text executable
!:mime text/x-python
+!:strength + 15
# def name(args, args):
-0 regex \^(\ |\\t){0,50}def\ {1,50}[a-zA-Z]{1,100}
->&0 regex \ {0,50}\\(([a-zA-Z]|,|\ ){1,255}\\):$ Python script text executable
+0 regex \^(\ |\\t)*def\ +[a-zA-Z]+
+>&0 regex \ *\\(([a-zA-Z]|,|\ )*\\):$ Python script text executable
!:mime text/x-python
+!:strength + 15
diff -u magic/Magdir.orig.0/rpm magic/Magdir/rpm
--- magic/Magdir.orig.0/rpm 2014-09-11 15:03:07.000000000 +0000
+++ magic/Magdir/rpm 2016-11-24 15:58:28.458225125 +0000
diff -u file-5.31.orig/magic/Magdir/rpm file-5.31/magic/Magdir/rpm
--- file-5.31.orig/magic/Magdir/rpm 2017-03-17 21:34:26.000000000 +0000
+++ file-5.31/magic/Magdir/rpm 2017-10-11 14:30:57.480078009 +0000
@@ -29,6 +29,7 @@
>>8 beshort 17 SuperH
>>8 beshort 18 Xtensa
@@ -286,18 +178,76 @@ diff -u magic/Magdir.orig.0/rpm magic/Magdir/rpm
#delta RPM Daniel Novotny (dnovotny@redhat.com)
0 string drpm Delta RPM
diff -u magic/Magdir.orig.0/securitycerts magic/Magdir/securitycerts
--- magic/Magdir.orig.0/securitycerts 2014-09-11 15:03:07.000000000 +0000
+++ magic/Magdir/securitycerts 2016-11-24 15:59:25.549060044 +0000
diff -u file-5.31.orig/magic/Magdir/ruby file-5.31/magic/Magdir/ruby
--- file-5.31.orig/magic/Magdir/ruby 2017-03-17 21:34:26.000000000 +0000
+++ file-5.31/magic/Magdir/ruby 2017-10-11 14:30:24.410682267 +0000
@@ -6,27 +6,46 @@
# From: Reuben Thomas <rrt@sc3d.org>
# Ruby scripts
-0 search/1/w #!\ /usr/bin/ruby Ruby script text executable
+0 search/1/w #!\ /usr/bin/ruby Ruby script text executable
!:strength + 15
!:mime text/x-ruby
0 search/1/w #!\ /usr/local/bin/ruby Ruby script text executable
!:strength + 15
!:mime text/x-ruby
-0 search/1 #!/usr/bin/env\ ruby Ruby script text executable
+0 search/1 #!/usr/bin/env\ ruby Ruby script text executable
!:strength + 15
!:mime text/x-ruby
-0 search/1 #!\ /usr/bin/env\ ruby Ruby script text executable
+0 search/1 #!\ /usr/bin/env\ ruby Ruby script text executable
!:strength + 15
!:mime text/x-ruby
# What looks like ruby, but does not have a shebang
# (modules and such)
# From: Lubomir Rintel <lkundrak@v3.sk>
-0 regex \^[\ \t]*require[\ \t]'[A-Za-z_/]+'
->0 regex include\ [A-Z]|def\ [a-z]|\ do$
->>0 regex \^[\ \t]*end([\ \t]*[;#].*)?$ Ruby script text
+0 regex \^[[:space:]]*require[[:space:]]'[A-Za-z_/]+'
+>0 regex def\ [a-z]|\ do$
+>>&0 regex \^[[:space:]]*end([[:space:]]+[;#].*)?$ Ruby script text
+!:strength + 30
!:mime text/x-ruby
-0 regex \^[\ \t]*(class|module)[\ \t][A-Z]
+0 regex \^[[:space:]]*(class|module)[[:space:]][A-Z]
>0 regex (modul|includ)e\ [A-Z]|def\ [a-z]
->>0 regex \^[\ \t]*end([\ \t]*[;#].*)?$ Ruby module source text
+>>&0 regex \^[[:space:]]*end([[:space:]]+[;#].*)?$ Ruby script text
+!:strength + 30
+!:mime text/x-ruby
+# Classes with no modules or defs, beats simple ASCII
+0 regex \^[[:space:]]*(class|module)[[:space:]][A-Z]
+>&0 regex \^[[:space:]]*end([[:space:]]+[;#if].*)?$ Ruby script text
+!:strength + 10
+!:mime text/x-ruby
+# Looks for function definiton to balance python magic
+# def name (args)
+# end
+0 regex \^[[:space:]]*def\ [a-z]|def\ [[:alpha:]]+::[a-z]
+>&0 regex \^[[:space:]]*end([[:space:]]+[;#].*)?$ Ruby script text
+!:strength + 10
+!:mime text/x-ruby
+
+0 regex \^[[:space:]]*require[[:space:]]'[A-Za-z_/]+' Ruby script text
+!:mime text/x-ruby
+0 regex \^[[:space:]]*include\ ([A-Z]+[a-z]*(::))+ Ruby script text
!:mime text/x-ruby
diff -u file-5.31.orig/magic/Magdir/securitycerts file-5.31/magic/Magdir/securitycerts
--- file-5.31.orig/magic/Magdir/securitycerts 2017-03-17 21:34:26.000000000 +0000
+++ file-5.31/magic/Magdir/securitycerts 2017-10-11 14:30:57.480078009 +0000
@@ -4,3 +4,5 @@
0 search/1 -----BEGIN\ CERTIFICATE------ RFC1421 Security Certificate text
0 search/1 -----BEGIN\ NEW\ CERTIFICATE RFC1421 Security Certificate Signing Request text
0 belong 0xedfeedfe Sun 'jks' Java Keystore File data
+
+0 string \0volume_key volume_key escrow packet
diff -u magic/Magdir.orig.0/varied.script magic/Magdir/varied.script
--- magic/Magdir.orig.0/varied.script 2015-03-27 17:59:39.000000000 +0000
+++ magic/Magdir/varied.script 2016-11-24 15:59:25.557060441 +0000
diff -u file-5.31.orig/magic/Magdir/varied.script file-5.31/magic/Magdir/varied.script
--- file-5.31.orig/magic/Magdir/varied.script 2017-03-17 21:34:26.000000000 +0000
+++ file-5.31/magic/Magdir/varied.script 2017-10-11 14:30:57.480078009 +0000
@@ -4,27 +4,35 @@
0 string/t #!\ / a
+2023 -1356
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
-1
View File
@@ -309,7 +309,6 @@ else
dnl Various checks for GD features
PHP_GD_ZLIB
PHP_GD_TTSTR
PHP_GD_WEBP
PHP_GD_JPEG
PHP_GD_PNG
+1
View File
@@ -381,6 +381,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_imagewebp, 0, 0, 1)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, to)
ZEND_ARG_INFO(0, quality)
ZEND_END_ARG_INFO()
#endif
+65 -22
View File
@@ -1709,13 +1709,28 @@ gdImagePtr gdImageScale(const gdImagePtr src, const unsigned int new_width, cons
return im_scaled;
}
static int gdRotatedImageSize(gdImagePtr src, const float angle, gdRectPtr bbox)
{
gdRect src_area;
double m[6];
gdAffineRotate(m, angle);
src_area.x = 0;
src_area.y = 0;
src_area.width = gdImageSX(src);
src_area.height = gdImageSY(src);
if (gdTransformAffineBoundingBox(&src_area, m, bbox) != GD_TRUE) {
return GD_FALSE;
}
return GD_TRUE;
}
gdImagePtr gdImageRotateNearestNeighbour(gdImagePtr src, const float degrees, const int bgColor)
{
float _angle = ((float) (-degrees / 180.0f) * (float)M_PI);
const int src_w = gdImageSX(src);
const int src_h = gdImageSY(src);
const unsigned int new_width = (unsigned int)(abs((int)(src_w * cos(_angle))) + abs((int)(src_h * sin(_angle))) + 0.5f);
const unsigned int new_height = (unsigned int)(abs((int)(src_w * sin(_angle))) + abs((int)(src_h * cos(_angle))) + 0.5f);
const gdFixed f_0_5 = gd_ftofx(0.5f);
const gdFixed f_H = gd_itofx(src_h/2);
const gdFixed f_W = gd_itofx(src_w/2);
@@ -1726,6 +1741,12 @@ gdImagePtr gdImageRotateNearestNeighbour(gdImagePtr src, const float degrees, co
unsigned int dst_offset_y = 0;
unsigned int i;
gdImagePtr dst;
gdRect bbox;
int new_height, new_width;
gdRotatedImageSize(src, degrees, &bbox);
new_width = bbox.width;
new_height = bbox.height;
if (new_width == 0 || new_height == 0) {
return NULL;
@@ -1768,8 +1789,6 @@ gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int b
const int angle_rounded = (int)floor(degrees * 100);
const int src_w = gdImageSX(src);
const int src_h = gdImageSY(src);
const unsigned int new_width = (unsigned int)(abs((int)(src_w * cos(_angle))) + abs((int)(src_h * sin(_angle))) + 0.5f);
const unsigned int new_height = (unsigned int)(abs((int)(src_w * sin(_angle))) + abs((int)(src_h * cos(_angle))) + 0.5f);
const gdFixed f_0_5 = gd_ftofx(0.5f);
const gdFixed f_H = gd_itofx(src_h/2);
const gdFixed f_W = gd_itofx(src_w/2);
@@ -1780,6 +1799,8 @@ gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int b
unsigned int dst_offset_y = 0;
unsigned int i;
gdImagePtr dst;
int new_width, new_height;
gdRect bbox;
const gdFixed f_slop_y = f_sin;
const gdFixed f_slop_x = f_cos;
@@ -1792,6 +1813,10 @@ gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int b
return NULL;
}
gdRotatedImageSize(src, degrees, &bbox);
new_width = bbox.width;
new_height = bbox.height;
dst = gdImageCreateTrueColor(new_width, new_height);
if (!dst) {
return NULL;
@@ -1831,8 +1856,7 @@ gdImagePtr gdImageRotateBilinear(gdImagePtr src, const float degrees, const int
float _angle = (float)((- degrees / 180.0f) * M_PI);
const unsigned int src_w = gdImageSX(src);
const unsigned int src_h = gdImageSY(src);
unsigned int new_width = abs((int)(src_w*cos(_angle))) + abs((int)(src_h*sin(_angle) + 0.5f));
unsigned int new_height = abs((int)(src_w*sin(_angle))) + abs((int)(src_h*cos(_angle) + 0.5f));
unsigned int new_width, new_height;
const gdFixed f_0_5 = gd_ftofx(0.5f);
const gdFixed f_H = gd_itofx(src_h/2);
const gdFixed f_W = gd_itofx(src_w/2);
@@ -1844,6 +1868,12 @@ gdImagePtr gdImageRotateBilinear(gdImagePtr src, const float degrees, const int
unsigned int dst_offset_y = 0;
unsigned int src_offset_x, src_offset_y;
gdImagePtr dst;
gdRect bbox;
gdRotatedImageSize(src, degrees, &bbox);
new_width = bbox.width;
new_height = bbox.height;
dst = gdImageCreateTrueColor(new_width, new_height);
if (dst == NULL) {
@@ -1863,7 +1893,7 @@ gdImagePtr gdImageRotateBilinear(gdImagePtr src, const float degrees, const int
const unsigned int m = gd_fxtoi(f_m);
const unsigned int n = gd_fxtoi(f_n);
if ((m > 0) && (m < src_h - 1) && (n > 0) && (n < src_w - 1)) {
if ((m >= 0) && (m < src_h - 1) && (n >= 0) && (n < src_w - 1)) {
const gdFixed f_f = f_m - gd_itofx(m);
const gdFixed f_g = f_n - gd_itofx(n);
const gdFixed f_w1 = gd_mulfx(f_1-f_f, f_1-f_g);
@@ -1871,11 +1901,6 @@ gdImagePtr gdImageRotateBilinear(gdImagePtr src, const float degrees, const int
const gdFixed f_w3 = gd_mulfx(f_f, f_1-f_g);
const gdFixed f_w4 = gd_mulfx(f_f, f_g);
if (n < src_w - 1) {
src_offset_x = n + 1;
src_offset_y = m;
}
if (m < src_h-1) {
src_offset_x = n;
src_offset_y = m + 1;
@@ -1890,13 +1915,13 @@ gdImagePtr gdImageRotateBilinear(gdImagePtr src, const float degrees, const int
register int pixel2, pixel3, pixel4;
if (src_offset_y + 1 >= src_h) {
pixel2 = bgColor;
pixel3 = bgColor;
pixel4 = bgColor;
pixel2 = pixel1;
pixel3 = pixel1;
pixel4 = pixel1;
} else if (src_offset_x + 1 >= src_w) {
pixel2 = bgColor;
pixel3 = bgColor;
pixel4 = bgColor;
pixel2 = pixel1;
pixel3 = pixel1;
pixel4 = pixel1;
} else {
pixel2 = src->tpixels[src_offset_y][src_offset_x + 1];
pixel3 = src->tpixels[src_offset_y + 1][src_offset_x];
@@ -1946,8 +1971,7 @@ gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, const float degrees, const
const float _angle = (float)((- degrees / 180.0f) * M_PI);
const int src_w = gdImageSX(src);
const int src_h = gdImageSY(src);
const unsigned int new_width = abs((int)(src_w*cos(_angle))) + abs((int)(src_h*sin(_angle) + 0.5f));
const unsigned int new_height = abs((int)(src_w*sin(_angle))) + abs((int)(src_h*cos(_angle) + 0.5f));
unsigned int new_width, new_height;
const gdFixed f_0_5 = gd_ftofx(0.5f);
const gdFixed f_H = gd_itofx(src_h/2);
const gdFixed f_W = gd_itofx(src_w/2);
@@ -1963,7 +1987,11 @@ gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, const float degrees, const
unsigned int dst_offset_y = 0;
unsigned int i;
gdImagePtr dst;
gdRect bbox;
gdRotatedImageSize(src, degrees, &bbox);
new_width = bbox.width;
new_height = bbox.height;
dst = gdImageCreateTrueColor(new_width, new_height);
if (dst == NULL) {
@@ -2206,8 +2234,11 @@ gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, const float degrees, const
gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, int bgcolor)
{
const int angle_rounded = (int)floor(angle * 100);
/* round to two decimals and keep the 100x multiplication to use it in the common square angles
case later. Keep the two decimal precisions so smaller rotation steps can be done, useful for
slow animations, f.e. */
const int angle_rounded = fmod((int) floorf(angle * 100), 360 * 100);
if (bgcolor < 0) {
return NULL;
}
@@ -2224,6 +2255,18 @@ gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, in
/* no interpolation needed here */
switch (angle_rounded) {
case 0: {
gdImagePtr dst = gdImageCreateTrueColor(src->sx, src->sy);
if (dst == NULL) {
return NULL;
}
dst->transparent = src->transparent;
dst->saveAlphaFlag = 1;
dst->alphaBlendingFlag = gdEffectReplace;
gdImageCopy(dst, src, 0,0,0,0,src->sx,src->sy);
return dst;
}
case -27000:
case 9000:
return gdImageRotate90(src, 0);
+4 -1
View File
@@ -164,7 +164,10 @@ readwbmp (int (*getin) (void *in), void *in, Wbmp ** return_wbmp)
}
if (skipheader (getin, in))
return (-1);
{
gdFree (wbmp);
return (-1);
}
wbmp->width = getmbi (getin, in);
+179
View File
@@ -0,0 +1,179 @@
--TEST--
Bug #65148 (imagerotate may alter image dimensions)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension is not available');
?>
--FILE--
<?php
$interpolations = array(
'IMG_BELL' => IMG_BELL,
'IMG_BESSEL' => IMG_BESSEL,
'IMG_BICUBIC' => IMG_BICUBIC,
'IMG_BICUBIC_FIXED' => IMG_BICUBIC_FIXED,
'IMG_BILINEAR_FIXED' => IMG_BILINEAR_FIXED,
'IMG_BLACKMAN' => IMG_BLACKMAN,
'IMG_BOX' => IMG_BOX,
'IMG_BSPLINE' => IMG_BSPLINE,
'IMG_CATMULLROM' => IMG_CATMULLROM,
'IMG_GAUSSIAN' => IMG_GAUSSIAN,
'IMG_GENERALIZED_CUBIC' => IMG_GENERALIZED_CUBIC,
'IMG_HERMITE' => IMG_HERMITE,
'IMG_HAMMING' => IMG_HAMMING,
'IMG_HANNING' => IMG_HANNING,
'IMG_MITCHELL' => IMG_MITCHELL,
'IMG_POWER' => IMG_POWER,
'IMG_QUADRATIC' => IMG_QUADRATIC,
'IMG_SINC' => IMG_SINC,
'IMG_NEAREST_NEIGHBOUR' => IMG_NEAREST_NEIGHBOUR,
'IMG_WEIGHTED4' => IMG_WEIGHTED4,
'IMG_TRIANGLE' => IMG_TRIANGLE,
);
$img = imagecreate(40, 20);
$results = array();
foreach ($interpolations as $name => $interpolation) {
imagesetinterpolation($img, $interpolation);
$t = imagecolorallocatealpha($img, 0, 0, 0, 127);
$imgr = imagerotate($img, -5, $t);
$results[$name] = array('x' => imagesx($imgr), 'y' => imagesy($imgr));
imagedestroy($imgr);
}
imagedestroy($img);
print_r($results);
?>
===DONE===
--EXPECT--
Array
(
[IMG_BELL] => Array
(
[x] => 40
[y] => 23
)
[IMG_BESSEL] => Array
(
[x] => 40
[y] => 23
)
[IMG_BICUBIC] => Array
(
[x] => 40
[y] => 23
)
[IMG_BICUBIC_FIXED] => Array
(
[x] => 40
[y] => 23
)
[IMG_BILINEAR_FIXED] => Array
(
[x] => 40
[y] => 23
)
[IMG_BLACKMAN] => Array
(
[x] => 40
[y] => 23
)
[IMG_BOX] => Array
(
[x] => 40
[y] => 23
)
[IMG_BSPLINE] => Array
(
[x] => 40
[y] => 23
)
[IMG_CATMULLROM] => Array
(
[x] => 40
[y] => 23
)
[IMG_GAUSSIAN] => Array
(
[x] => 40
[y] => 23
)
[IMG_GENERALIZED_CUBIC] => Array
(
[x] => 40
[y] => 23
)
[IMG_HERMITE] => Array
(
[x] => 40
[y] => 23
)
[IMG_HAMMING] => Array
(
[x] => 40
[y] => 23
)
[IMG_HANNING] => Array
(
[x] => 40
[y] => 23
)
[IMG_MITCHELL] => Array
(
[x] => 40
[y] => 23
)
[IMG_POWER] => Array
(
[x] => 40
[y] => 23
)
[IMG_QUADRATIC] => Array
(
[x] => 40
[y] => 23
)
[IMG_SINC] => Array
(
[x] => 40
[y] => 23
)
[IMG_NEAREST_NEIGHBOUR] => Array
(
[x] => 40
[y] => 23
)
[IMG_WEIGHTED4] => Array
(
[x] => 40
[y] => 23
)
[IMG_TRIANGLE] => Array
(
[x] => 40
[y] => 23
)
)
===DONE===
Binary file not shown.

Before

Width:  |  Height:  |  Size: 739 B

After

Width:  |  Height:  |  Size: 741 B

+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #75437 Wrong reflection on imagewebp
--SKIPIF--
<?php
if (!extension_loaded('reflection')) die('skip reflection not available');
if (!extension_loaded('gd')) die('skip gd extension not available');
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.0', '<')) die("skip test requires GD 2.2.0 or higher");
if (!function_exists('imagewebp')) die('skip WebP support not available');
?>
--FILE--
<?php
$rf = new ReflectionFunction('imagewebp');
var_dump($rf->getNumberOfParameters());
var_dump($rf->getNumberOfRequiredParameters());
?>
===DONE===
--EXPECT--
int(3)
int(1)
===DONE===
+20 -12
View File
@@ -24,25 +24,33 @@ if test "$PHP_HASH" != "no"; then
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(long long, 8)
PHP_CHECK_64BIT([
SHA3_DIR="sha3/generic32lc"
SHA3_OPT_SRC="$SHA3_DIR/KeccakP-1600-inplace32BI.c"
],[
SHA3_DIR="sha3/generic64lc"
SHA3_OPT_SRC="$SHA3_DIR/KeccakP-1600-opt64.c"
])
EXT_HASH_SHA3_SOURCES="$SHA3_OPT_SRC $SHA3_DIR/KeccakHash.c $SHA3_DIR/KeccakSponge.c"
PHP_HASH_CFLAGS="-I@ext_srcdir@/$SHA3_DIR -DKeccakP200_excluded -DKeccakP400_excluded -DKeccakP800_excluded"
if test $ac_cv_c_bigendian_php = yes; then
EXT_HASH_SHA3_SOURCES="hash_sha3.c"
AC_DEFINE(HAVE_SLOW_HASH3, 1, [Define is hash3 algo is available])
AC_MSG_WARN("Use SHA3 slow implementation on bigendian")
else
PHP_CHECK_64BIT([
SHA3_DIR="sha3/generic32lc"
SHA3_OPT_SRC="$SHA3_DIR/KeccakP-1600-inplace32BI.c"
],[
SHA3_DIR="sha3/generic64lc"
SHA3_OPT_SRC="$SHA3_DIR/KeccakP-1600-opt64.c"
])
EXT_HASH_SHA3_SOURCES="$SHA3_OPT_SRC $SHA3_DIR/KeccakHash.c $SHA3_DIR/KeccakSponge.c hash_sha3.c"
PHP_HASH_CFLAGS="-I@ext_srcdir@/$SHA3_DIR -DKeccakP200_excluded -DKeccakP400_excluded -DKeccakP800_excluded"
PHP_ADD_BUILD_DIR(ext/hash/$SHA3_DIR, 1)
fi
EXT_HASH_SOURCES="hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c \
hash_tiger.c hash_gost.c hash_snefru.c hash_whirlpool.c hash_adler32.c \
hash_crc32.c hash_fnv.c hash_joaat.c hash_sha3.c $EXT_HASH_SHA3_SOURCES"
hash_crc32.c hash_fnv.c hash_joaat.c $EXT_HASH_SHA3_SOURCES"
EXT_HASH_HEADERS="php_hash.h php_hash_md.h php_hash_sha.h php_hash_ripemd.h \
php_hash_haval.h php_hash_tiger.h php_hash_gost.h php_hash_snefru.h \
php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h \
php_hash_fnv.h php_hash_joaat.h php_hash_sha3.h"
PHP_ADD_BUILD_DIR(ext/hash/$SHA3_DIR, 1)
PHP_NEW_EXTENSION(hash, $EXT_HASH_SOURCES, $ext_shared,,$PHP_HASH_CFLAGS)
ifdef([PHP_INSTALL_HEADERS], [
PHP_INSTALL_HEADERS(ext/hash, $EXT_HASH_HEADERS)
+214
View File
@@ -19,6 +19,217 @@
#include "php_hash.h"
#include "php_hash_sha3.h"
#ifdef HAVE_SLOW_HASH3
// ================= slow algo ==============================================
#if (defined(__APPLE__) || defined(__APPLE_CC__)) && \
(defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
# if defined(__LITTLE_ENDIAN__)
# undef WORDS_BIGENDIAN
# else
# if defined(__BIG_ENDIAN__)
# define WORDS_BIGENDIAN
# endif
# endif
#endif
static inline uint64_t rol64(uint64_t v, unsigned char b) {
return (v << b) | (v >> (64 - b));
}
static inline unsigned char idx(unsigned char x, unsigned char y) {
return x + (5 * y);
}
#ifdef WORDS_BIGENDIAN
static inline uint64_t load64(const unsigned char* x) {
signed char i;
uint64_t ret = 0;
for (i = 7; i >= 0; --i) {
ret <<= 8;
ret |= x[i];
}
return ret;
}
static inline void store64(unsigned char* x, uint64_t val) {
char i;
for (i = 0; i < 8; ++i) {
x[i] = val & 0xFF;
val >>= 8;
}
}
static inline void xor64(unsigned char* x, uint64_t val) {
char i;
for (i = 0; i < 8; ++i) {
x[i] ^= val & 0xFF;
val >>= 8;
}
}
# define readLane(x, y) load64(ctx->state+sizeof(uint64_t)*idx(x, y))
# define writeLane(x, y, v) store64(ctx->state+sizeof(uint64_t)*idx(x, y), v)
# define XORLane(x, y, v) xor64(ctx->state+sizeof(uint64_t)*idx(x, y), v)
#else
# define readLane(x, y) (((uint64_t*)ctx->state)[idx(x,y)])
# define writeLane(x, y, v) (((uint64_t*)ctx->state)[idx(x,y)] = v)
# define XORLane(x, y, v) (((uint64_t*)ctx->state)[idx(x,y)] ^= v)
#endif
static inline char LFSR86540(unsigned char* pLFSR)
{
unsigned char LFSR = *pLFSR;
char result = LFSR & 0x01;
if (LFSR & 0x80) {
// Primitive polynomial over GF(2): x^8+x^6+x^5+x^4+1
LFSR = (LFSR << 1) ^ 0x71;
} else {
LFSR <<= 1;
}
*pLFSR = LFSR;
return result;
}
static void permute(PHP_SHA3_CTX* ctx) {
unsigned char LFSRstate = 0x01;
unsigned char round;
for (round = 0; round < 24; ++round) {
{ // Theta step (see [Keccak Reference, Section 2.3.2])
uint64_t C[5], D;
unsigned char x, y;
for (x = 0; x < 5; ++x) {
C[x] = readLane(x, 0) ^ readLane(x, 1) ^
readLane(x, 2) ^ readLane(x, 3) ^ readLane(x, 4);
}
for (x = 0; x < 5; ++x) {
D = C[(x+4)%5] ^ rol64(C[(x+1)%5], 1);
for (y = 0; y < 5; ++y) {
XORLane(x, y, D);
}
}
}
{ // p and Pi steps (see [Keccak Reference, Sections 2.3.3 and 2.3.4])
unsigned char x = 1, y = 0, t;
uint64_t current = readLane(x, y);
for (t = 0; t < 24; ++t) {
unsigned char r = ((t + 1) * (t + 2) / 2) % 64;
unsigned char Y = (2*x + 3*y) % 5;
uint64_t temp;
x = y;
y = Y;
temp = readLane(x, y);
writeLane(x, y, rol64(current, r));
current = temp;
}
}
{ // X step (see [Keccak Reference, Section 2.3.1])
unsigned char x, y;
for (y = 0; y < 5; ++y) {
uint64_t temp[5];
for (x = 0; x < 5; ++x) {
temp[x] = readLane(x, y);
}
for (x = 0; x < 5; ++x) {
writeLane(x, y, temp[x] ^((~temp[(x+1)%5]) & temp[(x+2)%5]));
}
}
}
{ // i step (see [Keccak Reference, Section 2.3.5])
unsigned char j;
for (j = 0; j < 7; ++j) {
if (LFSR86540(&LFSRstate)) {
uint64_t bitPos = (1<<j) - 1;
XORLane(0, 0, (uint64_t)1 << bitPos);
}
}
}
}
}
// ==========================================================================
static void PHP_SHA3_Init(PHP_SHA3_CTX* ctx,
int bits) {
memset(ctx, 0, sizeof(PHP_SHA3_CTX));
}
static void PHP_SHA3_Update(PHP_SHA3_CTX* ctx,
const unsigned char* buf,
unsigned int count,
size_t block_size) {
while (count > 0) {
unsigned int len = block_size - ctx->pos;
if (len > count) len = count;
count -= len;
while (len-- > 0) {
ctx->state[ctx->pos++] ^= *(buf++);
}
if (ctx->pos >= block_size) {
permute(ctx);
ctx->pos = 0;
}
}
}
static void PHP_SHA3_Final(unsigned char* digest,
PHP_SHA3_CTX* ctx,
int block_size,
int digest_size) {
int len = digest_size;
// Pad state to finalize
ctx->state[ctx->pos++] ^= 0x06;
ctx->state[block_size-1] ^= 0x80;
permute(ctx);
// Square output for digest
for(;;) {
int bs = (len < block_size) ? len : block_size;
memcpy(digest, ctx->state, bs);
digest += bs;
len -= bs;
if (!len) break;
permute(ctx);
}
// Zero out context
memset(ctx, 0, sizeof(PHP_SHA3_CTX));
}
// ==========================================================================
#define DECLARE_SHA3_OPS(bits) \
void PHP_SHA3##bits##Init(PHP_SHA3_##bits##_CTX* ctx) { \
PHP_SHA3_Init(ctx, bits); \
} \
void PHP_SHA3##bits##Update(PHP_SHA3_##bits##_CTX* ctx, \
const unsigned char* input, \
unsigned int inputLen) { \
PHP_SHA3_Update(ctx, input, inputLen, \
(1600 - (2 * bits)) >> 3); \
} \
void PHP_SHA3##bits##Final(unsigned char* digest, \
PHP_SHA3_##bits##_CTX* ctx) { \
PHP_SHA3_Final(digest, ctx, \
(1600 - (2 * bits)) >> 3, \
bits >> 3); \
} \
const php_hash_ops php_hash_sha3_##bits##_ops = { \
(php_hash_init_func_t) PHP_SHA3##bits##Init, \
(php_hash_update_func_t) PHP_SHA3##bits##Update, \
(php_hash_final_func_t) PHP_SHA3##bits##Final, \
php_hash_copy, \
bits >> 3, \
(1600 - (2 * bits)) >> 3, \
sizeof(PHP_SHA3_##bits##_CTX), \
1 \
}
#else
// ================= fast algo ==============================================
#define SUCCESS SHA3_SUCCESS /* Avoid conflict between KeccacHash.h and zend_types.h */
#include "KeccakHash.h"
@@ -60,6 +271,9 @@ const php_hash_ops php_hash_sha3_##bits##_ops = { \
1 \
}
#endif
// ================= both algo ==============================================
DECLARE_SHA3_OPS(224);
DECLARE_SHA3_OPS(256);
DECLARE_SHA3_OPS(384);
+5
View File
@@ -22,7 +22,12 @@
#include "php.h"
typedef struct {
#ifdef HAVE_SLOW_HASH3
unsigned char state[200]; // 5 * 5 * sizeof(uint64)
uint32_t pos;
#else
void *hashinstance;
#endif
} PHP_SHA3_CTX;
typedef PHP_SHA3_CTX PHP_SHA3_224_CTX;
+4 -4
View File
@@ -53,7 +53,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_ibase_errcode, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_ibase_connect, 0, 0, 1)
ZEND_BEGIN_ARG_INFO_EX(arginfo_ibase_connect, 0, 0, 0)
ZEND_ARG_INFO(0, database)
ZEND_ARG_INFO(0, username)
ZEND_ARG_INFO(0, password)
@@ -63,7 +63,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ibase_connect, 0, 0, 1)
ZEND_ARG_INFO(0, role)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_ibase_pconnect, 0, 0, 1)
ZEND_BEGIN_ARG_INFO_EX(arginfo_ibase_pconnect, 0, 0, 0)
ZEND_ARG_INFO(0, database)
ZEND_ARG_INFO(0, username)
ZEND_ARG_INFO(0, password)
@@ -1030,7 +1030,7 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /*
}
/* }}} */
/* {{{ proto resource ibase_connect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]])
/* {{{ proto resource ibase_connect([string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]]])
Open a connection to an InterBase database */
PHP_FUNCTION(ibase_connect)
{
@@ -1038,7 +1038,7 @@ PHP_FUNCTION(ibase_connect)
}
/* }}} */
/* {{{ proto resource ibase_pconnect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]])
/* {{{ proto resource ibase_pconnect([string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]]])
Open a persistent connection to an InterBase database */
PHP_FUNCTION(ibase_pconnect)
{
+5 -5
View File
@@ -411,7 +411,7 @@ static zend_bool php_converter_set_encoding(php_converter_object *objval,
ZEND_BEGIN_ARG_INFO_EX(php_converter_set_encoding_arginfo, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, encoding)
ZEND_END_ARG_INFO();
static void php_converter_do_set_encoding(UConverter *cnv, INTERNAL_FUNCTION_PARAMETERS) {
static void php_converter_do_set_encoding(UConverter **pcnv, INTERNAL_FUNCTION_PARAMETERS) {
php_converter_object *objval = CONV_GET(getThis());
char *enc;
size_t enc_len;
@@ -423,21 +423,21 @@ static void php_converter_do_set_encoding(UConverter *cnv, INTERNAL_FUNCTION_PAR
}
intl_errors_reset(&objval->error);
RETURN_BOOL(php_converter_set_encoding(objval, &(objval->src), enc, enc_len));
RETURN_BOOL(php_converter_set_encoding(objval, pcnv, enc, enc_len));
}
/* }}} */
/* {{{ proto bool UConverter::setSourceEncoding(string encoding) */
static PHP_METHOD(UConverter, setSourceEncoding) {
php_converter_object *objval = CONV_GET(getThis());
php_converter_do_set_encoding(objval->src, INTERNAL_FUNCTION_PARAM_PASSTHRU);
php_converter_do_set_encoding(&(objval->src), INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* }}} */
/* {{{ proto bool UConverter::setDestinationEncoding(string encoding) */
static PHP_METHOD(UConverter, setDestinationEncoding) {
php_converter_object *objval = CONV_GET(getThis());
php_converter_do_set_encoding(objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU);
php_converter_do_set_encoding(&(objval->dest), INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* }}} */
@@ -897,7 +897,7 @@ static PHP_METHOD(UConverter, getAvailable) {
/* }}} */
/* {{{ proto array UConverter::getAliases(string name) */
ZEND_BEGIN_ARG_INFO_EX(php_converter_getaliases_arginfo, 0, ZEND_RETURN_VALUE, 0)
ZEND_BEGIN_ARG_INFO_EX(php_converter_getaliases_arginfo, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, name)
ZEND_END_ARG_INFO();
static PHP_METHOD(UConverter, getAliases) {
+2
View File
@@ -145,6 +145,7 @@ PHP_FUNCTION(datefmt_parse)
DATE_FORMAT_METHOD_FETCH_OBJECT;
if (z_parse_pos) {
ZVAL_DEREF(z_parse_pos);
convert_to_long(z_parse_pos);
if (ZEND_LONG_INT_OVFL(Z_LVAL_P(z_parse_pos))) {
intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR);
@@ -188,6 +189,7 @@ PHP_FUNCTION(datefmt_localtime)
DATE_FORMAT_METHOD_FETCH_OBJECT;
if (z_parse_pos) {
ZVAL_DEREF(z_parse_pos);
convert_to_long(z_parse_pos);
if (ZEND_LONG_INT_OVFL(Z_LVAL_P(z_parse_pos))) {
intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR);
+12
View File
@@ -1045,6 +1045,11 @@ PHP_RSHUTDOWN_FUNCTION( intl )
*/
PHP_MINFO_FUNCTION( intl )
{
#if !UCONFIG_NO_FORMATTING
UErrorCode status = U_ZERO_ERROR;
const char *tzdata_ver = NULL;
#endif
php_info_print_table_start();
php_info_print_table_header( 2, "Internationalization support", "enabled" );
php_info_print_table_row( 2, "version", INTL_MODULE_VERSION );
@@ -1052,6 +1057,13 @@ PHP_MINFO_FUNCTION( intl )
#ifdef U_ICU_DATA_VERSION
php_info_print_table_row( 2, "ICU Data version", U_ICU_DATA_VERSION );
#endif
#if !UCONFIG_NO_FORMATTING
tzdata_ver = ucal_getTZDataVersion(&status);
if (U_ZERO_ERROR == status) {
php_info_print_table_row( 2, "ICU TZData version", tzdata_ver);
}
#endif
php_info_print_table_row( 2, "ICU Unicode version", U_UNICODE_VERSION );
php_info_print_table_end();
/* For the default locale php.ini setting */
@@ -78,4 +78,8 @@ extern zend_class_entry *Spoofchecker_ce_ptr;
RETURN_FALSE; \
} \
#if U_ICU_VERSION_MAJOR_NUM >= 58
#define SPOOFCHECKER_DEFAULT_RESTRICTION_LEVEL USPOOF_HIGHLY_RESTRICTIVE
#endif
#endif // #ifndef SPOOFCHECKER_CLASS_H
@@ -43,12 +43,23 @@ PHP_METHOD(Spoofchecker, __construct)
co->uspoof = uspoof_open(SPOOFCHECKER_ERROR_CODE_P(co));
INTL_METHOD_CHECK_STATUS(co, "spoofchecker: unable to open ICU Spoof Checker");
#if U_ICU_VERSION_MAJOR_NUM >= 58
/* TODO save it into the object for further suspiction check comparison. */
/* ICU 58 removes WSC and MSC handling. However there are restriction
levels as defined in
http://www.unicode.org/reports/tr39/tr39-15.html#Restriction_Level_Detection
and the default is high restrictive. In further, we might want to utilize
uspoof_check2 APIs when it became stable, to use extended check result APIs.
Subsequent changes in the unicode security algos are to be watched.*/
uspoof_setRestrictionLevel(co->uspoof, SPOOFCHECKER_DEFAULT_RESTRICTION_LEVEL);
#else
/* Single-script enforcement is on by default. This fails for languages
like Japanese that legally use multiple scripts within a single word,
so we turn it off.
*/
checks = uspoof_getChecks(co->uspoof, SPOOFCHECKER_ERROR_CODE_P(co));
uspoof_setChecks(co->uspoof, checks & ~USPOOF_SINGLE_SCRIPT, SPOOFCHECKER_ERROR_CODE_P(co));
#endif
zend_restore_error_handling(&error_handling);
}
/* }}} */
@@ -1,9 +1,11 @@
--TEST--
IntlBreakIterator::getPartsIterator(): basic test
IntlBreakIterator::getPartsIterator(): basic test, ICU <= 57.1
--SKIPIF--
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '57.1') > 0) die('skip for ICU <= 57.1');
?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -34,4 +36,4 @@ Array
[2] => bar
)
int(0)
==DONE==
==DONE==
@@ -0,0 +1,39 @@
--TEST--
IntlBreakIterator::getPartsIterator(): basic test, ICU >= 58.1
--SKIPIF--
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '57.1') <= 0) die('skip for ICU >= 58.1');
?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
ini_set("intl.default_locale", "pt_PT");
$bi = IntlBreakIterator::createWordInstance('pt');
$pi = $bi->getPartsIterator();
var_dump(get_class($pi));
print_r(iterator_to_array($pi));
$bi->setText("foo bar");
$pi = $bi->getPartsIterator();
var_dump(get_class($pi->getBreakIterator()));
print_r(iterator_to_array($pi));
var_dump($pi->getRuleStatus());
?>
==DONE==
--EXPECTF--
string(17) "IntlPartsIterator"
Array
(
)
string(26) "IntlRuleBasedBreakIterator"
Array
(
[0] => foo
[1] =>
[2] => bar
)
int(%d)
==DONE==
@@ -1,9 +1,11 @@
--TEST--
IntlBreakIterator::preceding(): basic test
IntlBreakIterator::preceding(): basic test, ICU <= 57.1
--SKIPIF--
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '57.1') > 0) die('skip for ICU <= 57.1');
?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -21,4 +23,4 @@ var_dump($bi->preceding(-1));
int(4)
int(21)
int(0)
==DONE==
==DONE==
@@ -0,0 +1,25 @@
--TEST--
IntlBreakIterator::preceding(): basic test, ICU >= 58.1
--SKIPIF--
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '57.1') <= 0) die('skip for ICU >= 58.1');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
ini_set("intl.default_locale", "pt_PT");
$bi = IntlBreakIterator::createWordInstance('pt');
$bi->setText('foo bar trans zoo bee');
var_dump($bi->preceding(5));
var_dump($bi->preceding(50));
var_dump($bi->preceding(-1));
?>
==DONE==
--EXPECTF--
int(4)
int(21)
int(%i)
==DONE==
+53
View File
@@ -0,0 +1,53 @@
--TEST--
Bug #75317 (UConverter::setDestinationEncoding changes source instead of destinatination)
--SKIPIF--
<?php
if (!extension_loaded('intl')) die('skip intl extension is not available');
?>
--FILE--
<?php
$utf8 = UConverter::getAliases('utf-8')[0];
$utf16 = UConverter::getAliases('utf-16')[0];
$utf32 = UConverter::getAliases('utf-32')[0];
$latin1 = UConverter::getAliases('latin1')[0];
function printResult($actual, $expected) {
var_dump($actual === $expected ? true : "expected: $expected, actual: $actual");
}
// test default values
$c = new UConverter();
printResult($c->getDestinationEncoding(), $utf8);
printResult($c->getSourceEncoding(), $utf8);
// test constructor args
$c = new UConverter('utf-16', 'latin1');
printResult($c->getDestinationEncoding(), $utf16);
printResult($c->getSourceEncoding(), $latin1);
// test setters
var_dump($c->setDestinationEncoding('utf-8'));
var_dump($c->setSourceEncoding('utf-32'));
printResult($c->getDestinationEncoding(), $utf8);
printResult($c->getSourceEncoding(), $utf32);
// test invalid inputs dont change values
var_dump($c->setDestinationEncoding('foobar') === false);
var_dump($c->setSourceEncoding('foobar') === false);
printResult($c->getDestinationEncoding(), $utf8);
printResult($c->getSourceEncoding(), $utf32);
?>
--EXPECT--
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
+15
View File
@@ -0,0 +1,15 @@
--TEST--
Bug #75318 (The parameter of UConverter::getAliases() is not optional)
--SKIP--
<?php
if (!extension_loaded('intl')) die('skip intl extension is not available');
?>
--FILE--
<?php
$rm = new ReflectionMethod('UConverter', 'getAliases');
var_dump($rm->getNumberOfRequiredParameters());
?>
===DONE===
--EXPECT--
int(1)
===DONE===
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #75378 ([REGRESSION] IntlDateFormatter::parse() does not change $position argument)
--SKIPIF--
<?php
if (!extension_loaded('intl')) die('skip this test requires ext/intl');
?>
--FILE--
<?php
$formatter = new IntlDateFormatter("en-GB", IntlDateFormatter::NONE, IntlDateFormatter::NONE, 'UTC', null, 'yyyy-MM-dd');
$position = 0;
$parsedDate = $formatter->parse("2017-10-12", $position);
var_dump($position);
$localdate = $formatter->localtime("2017-10-12 00:00:00", $position1);
var_dump($position1);
?>
--EXPECT--
int(10)
int(10)
Loaded 100 of 248 files, more files were not shown because too many files have changed in this diff. Show more