1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Commit Graph

9966 Commits

Author SHA1 Message Date
Bob Weinand 6bb81d2c5f Fix non-/Zend tests too 2016-04-16 20:57:28 +02:00
Nikita Popov d8590940a1 Use symtable lookup for arrays in array_column 2016-04-16 09:59:01 +02:00
Nikita Popov 28801bf249 Respect property visibility in array_column 2016-04-16 09:59:01 +02:00
Nikita Popov c0d8dc5bd7 Fixed bug #72031 2016-04-16 09:58:57 +02:00
Xinchen Hui 5db4d9a71c Fixed bug #71995 (Returning the same var twice from __sleep() produces broken serialized data) 2016-04-09 10:01:04 -07:00
Xinchen Hui c85907682a Improved fix for #71940 2016-04-07 19:28:54 +08:00
Xinchen Hui 079239a7ce Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src:
  Remove __halt_compiler from semi-reserved tokens
  Fixed Bug #71974 Trans sid will always be send, even if cookies are available
  Optimized array_fill(). This is a perfect function for fast creation of packed arrays.
  Fixed build
  fix merge mistake
  fix tests
  PostgreSQL's PDOStatement::getColumnMeta() fills in table's name.
  fix indent
  Fixed bug #71978 (Existence of return type hint affects other compatibility rules)
  fix test
  fix bug #71667 (emulate how mssql extension names "computed" columns)
  update NEWS
  add 32-bit specific variont for #62498
  skip test on 32-bit
  make opcache lockfile path configurable
  return zvals instead of strings, cast or not based on stringify attribute
  fix test
  add skip slow test
2016-04-07 13:58:00 +08:00
Xinchen Hui 7e042224a2 Fixed bug #71940 (Unserialize crushes on restore object reference) 2016-04-07 13:56:55 +08:00
Dmitry Stogov b31240f995 Optimized array_fill(). This is a perfect function for fast creation of packed arrays. 2016-04-07 01:01:11 +03:00
Xinchen Hui e95782ed5e Fixed bug #71969 (str_replace returns an incorrect resulting array after a foreach by reference) 2016-04-06 10:19:24 +08:00
Joe Watkins 034e8ec02e fix #71287 (substr_replace bug when length type is string) 2016-03-31 17:10:12 +01:00
Joe Watkins 3b13206aa9 Merge branch 'PHP-7.0' of https://github.com/php/php-src into PHP-7.0 2016-03-31 12:40:15 +01:00
Joe Watkins 233115ea23 fix #71609: Segmentation fault on ZTS with gethostbyname 2016-03-31 12:39:01 +01:00
Nikita Popov b1e854f776 Fix bug #71334
Always duplicate the array before doing a sort with user-defined
comparison function, to avoid access to the intermediate
inconsistent state.

I've also dropped the "array modification" warning, as protection
against modifications is no longer relevant if we're always working
on a copy anyway.

This also required some changes to how SplArray forwards calls to
sorting functions.
2016-03-30 22:49:27 +02:00
Anatol Belski 6afa41cf80 Merge remote-tracking branch 'origin/PHP-7.0.5' into PHP-7.0
* origin/PHP-7.0.5:
  Fixed bug #71704 php_snmp_error() Format String Vulnerability
  Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
  Updated to version 2016.3 (2016c)
  Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
  Fixed bug #71527 Buffer over-write in finfo_open with malformed magic file
  Fix bug #71798 - Integer Overflow in php_raw_url_encode
  update NEWS
  Disable huge pages in the Zend allocator by default As per the discussion on internals, this is an expert feature that needs special system-level configuration and care.
  Added ability to disable huge pages in Zend Memeory Manager through the environment variable USE_ZEND_ALLOC_HUGE_PAGES=0.
  Fix bug #71860: Require valid paths for phar filenames
  Fix bug #71860: Require valid paths for phar filenames
  update NEWS
  Fixed bug #71704 php_snmp_error() Format String Vulnerability
  Merge branch 'PHP-5.6' into PHP-7.0
  Updated to version 2016.2 (2016b)
  update libs versions
  set RC1 versions
  Going for 5.5.34
2016-03-29 11:24:33 +02:00
Stanislav Malyshev 67fbb06311 Merge branch 'PHP-5.5' into PHP-7.0.5
* PHP-5.5:
  Fixed bug #71704 php_snmp_error() Format String Vulnerability
  Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
  Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
  Fix bug #71798 - Integer Overflow in php_raw_url_encode
  Fix bug #71860: Require valid paths for phar filenames
  Going for 5.5.34

Conflicts:
	configure.in
	ext/phar/phar_object.c
	ext/phar/tests/badparameters.phpt
	ext/phar/tests/create_path_error.phpt
	ext/phar/tests/pharfileinfo_construct.phpt
	ext/snmp/snmp.c
	ext/standard/url.c
	main/php_version.h
2016-03-28 23:55:05 -07:00
Stanislav Malyshev 95433e8e33 Fix bug #71798 - Integer Overflow in php_raw_url_encode 2016-03-27 14:22:19 -07:00
Nikita Popov bd90f5507f Merge branch 'PHP-5.6' into PHP-7.0
Conflicts:
	ext/standard/crypt.c
2016-03-25 20:23:04 +01:00
Nikita Popov 54da966883 Fixed bug #67512 2016-03-25 20:18:46 +01:00
Xinchen Hui 1929fc9b16 Fixed bug #71891 (header_register_callback() and register_shutdown_function())
Actually, this fixed the memleak not the behavior(it is expected
behavior that "shutdown" is not outputed)
2016-03-25 12:34:22 +08:00
Xinchen Hui a3946de339 Fixed Bug #71884 (Null pointer deref (segfault) in stream_context_get_default) 2016-03-23 16:16:26 +08:00
Stanislav Malyshev c4517b2a5e Fix bug #71750: use zend_string_safe_alloc for calculated allocations 2016-03-20 22:39:17 -07:00
Xinchen Hui 345ecd9822 Fixed #71837 (Wrong arrays behaviour) 2016-03-17 07:41:41 -07:00
Xinchen Hui fe1a3fc08b Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed bug #71841 (EG(error_zval) is not handled well)
  Fixed bug #71840 (Unserialize accepts wrongly data)

Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/standard/var_unserializer.c
2016-03-17 15:22:44 +08:00
Xinchen Hui 6f241f5fad Fixed bug #71840 (Unserialize accepts wrongly data) 2016-03-17 15:15:28 +08:00
Anatol Belski 84651b32eb fix uninitialized value 2016-03-15 06:43:29 +01:00
Nikita Popov 02743f43c2 Fixed bug #71806 2016-03-11 22:45:38 +01:00
Anatol Belski 8b5d09a195 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix error condition, part of bug #71753
2016-03-10 11:39:16 +01:00
Anatol Belski 8cd903ea68 fix error condition, part of bug #71753 2016-03-10 11:35:50 +01:00
Xinchen Hui a0fac47364 object->ce should not be NULL 2016-03-10 15:26:15 +08:00
Xinchen Hui 351201bc7b Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed typo (partially fix for #71753)

Conflicts:
	ext/standard/uuencode.c
2016-03-10 15:23:40 +08:00
Xinchen Hui 915a3762ef Fixed typo (partially fix for #71753) 2016-03-10 15:22:34 +08:00
Xinchen Hui c3cf6f2a68 emalloc never returns NULL (partially fix for #71753) 2016-03-10 15:15:26 +08:00
Nikita Popov 5602f64213 Eliminate usages of _PP macros
These are either in debug code (fix them), commented out (drop
them) or in dead compatibility macros (drop them).

One usage was in php_stream_get_from_zval(), which we have not used
since at least PHP 5.2 and, judging from the fact that nobody
complained about it causing compile errors in PHP 7, nobody else
uses it either, so drop it.

There are still remaining uses in mysqli embedded and odbc birdstep.
These probably need to be dropped outright.
2016-03-03 23:20:12 +01:00
Nikita Popov 159602bd86 Merge branch 'PHP-5.6' into PHP-7.0 2016-03-03 17:29:58 +01:00
Anton Blanchard ccd215a517 Additional improvements to crypt() detection code
Reformat to normalize tabs vs spaces, return 1 if crypt.h not
defined, fix C99 compliance.
2016-03-03 17:28:34 +01:00
Nikita Popov 5a01605b4b Merge branch 'PHP-5.6' into PHP-7.0 2016-03-03 17:14:18 +01:00
Michael Orlitzky 08fce8e2c5 ext/standard/config.m4: fix crypt() test segfaults in >=glibc-2.17.
Starting with glibc-2.17, the crypt() function will report an EINVAL
and return NULL when the format of the "salt" parameter is
invalid. The current tests for crypt() pass its result to strcmp(),
causing segfaults when the value returned from crypt() is NULL.

This commit modifies the test programs to exit with failure when
crypt() returns NULL.

Reference: https://bugs.gentoo.org/show_bug.cgi?id=518964
2016-03-03 17:12:57 +01:00
Dmitry Stogov afedd4fd59 Fixed test (sizeof(zend_string) is different on 32 and 64-bit systems) 2016-03-02 13:01:42 +03:00
Dmitry Stogov ab800642df Introduce zend_symtable_exists_ind() for API consistency 2016-03-02 11:53:47 +03:00
Stanislav Malyshev 6f8585fc7d Merge branch 'PHP-7.0.4' into PHP-7.0
* PHP-7.0.4:
  Fix bug #71610: Type Confusion Vulnerability - SOAP / make_http_soap_request()
  Fix bug #71637: Multiple Heap Overflow due to integer overflows
  set versions

Conflicts:
	configure.in
	main/php_version.h
2016-03-01 22:22:47 -08:00
Xinchen Hui 2d4186dde7 Use hash_exists_ind in symbol table 2016-03-02 12:11:13 +08:00
Xinchen Hui 961c8d568d Maybe we should introduce a symtable_exists_ind 2016-03-01 20:01:02 +08:00
Xinchen Hui 186844be92 Fixed bug #71695 (Global variables are reserved before execution).
Instead of slow down hash_merge, we may also check the array(whether it
contains INDIRECT) outside of the loop, however, consisdering hash_merge
is not widly used, I prefer fix this in the current way to keep the
codes simple
2016-03-01 19:19:07 +08:00
Xinchen Hui c299b272c7 Fixed bug #71660 (array_column behaves incorrectly after foreach by reference) 2016-02-25 16:07:22 +08:00
Stanislav Malyshev 57b997ebf9 Fix bug #71637: Multiple Heap Overflow due to integer overflows 2016-02-21 23:14:29 -08:00
Andrea Faulds a50c31da19 Test that mt_rand() consistently produces the wrong results
See 6f6bd8ce53 and its revert,
a0724d3081.
2016-02-18 22:35:44 +00:00
Leigh a0724d3081 Revert "Fix #71152: mt_rand() returns the different values from original mt19937ar.c"
This reverts commit 6f6bd8ce53.

`mt_rand()` is seedable with `mt_srand()` which means it can be used to (re)produce specific streams of numbers. All code (no matter how few instances that may be) that previously depended on this behaviour will no longer produce the same results.

This kind of change needs to be discussed before being committed.
2016-02-18 11:09:01 +00:00
Stanislav Malyshev 9afb29aa68 Remove TSRMLS_* from code, they are not used anymore 2016-02-17 22:44:05 -08:00
kusano 6f6bd8ce53 Fix #71152: mt_rand() returns the different values from original mt19937ar.c 2016-02-17 11:32:59 +08:00