Commit Graph

8989 Commits

Author SHA1 Message Date
Lior Kaplan
2334785f98 RETVAL_STRINGL takes only two variables
Follow up for commit f4cfaf36
2014-07-22 19:38:35 +03:00
Nikita Popov
d4d4b69e72 Merge branch 'phpng' into ast
Conflicts:
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h

Some of dmitry's optimizations are not merged in yet!
2014-07-22 18:24:58 +02:00
Nikita Popov
b9be66ebf2 Implement declare() 2014-07-22 16:11:19 +02:00
Andrea Faulds
7148a4cf03 Added -1 safety check, fixed test 2014-07-15 13:53:24 +01:00
Andrea Faulds
6692d15e26 php_error_docref 2014-07-15 13:48:55 +01:00
Dmitry Stogov
8217e20ddb Fixed compilation warnings 2014-07-15 15:51:40 +04:00
Dmitry Stogov
b4c2bd2277 Fixed compilation on Windows 2014-07-15 15:50:42 +04:00
Andrea Faulds
97c6c48ae8 Fixed testcase 2014-07-15 02:08:26 +01:00
Andrea Faulds
a521fe51d3 Implemented intdiv() 2014-07-15 00:35:26 +01:00
Anatol Belski
1fef4e87fc Merge branch 'PHP-5.6'
* PHP-5.6:
  fix C89 compat
  This test depends on expose_php being on
  The test output is dependent on expose_php ini
  1.2 is a problematic float to print out Lower the default display precision for this test
  Test output relies on expose_php being on
2014-07-14 20:28:23 +02:00
Anatol Belski
236365a016 fix C89 compat 2014-07-14 20:27:59 +02:00
Dmitry Stogov
32e477c98c Merge branch 'master' into phpng
* master: (40 commits)
  Bug #67609: TLS connections fail behind HTTP proxy
  Updated NEWS for #67594
  Updated NEWS for #67594
  Fix #67594 - invisible colon should be stripped off header name
  Updated NEWS for 34407
  Updated NEWS for 34407
  Updated NEWS for 34407
  Fix for bug #34407 - ucwords and title case
  fixed broken merged code
  Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index.
  fixed broken merged code
  Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index.
  Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index.
  Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index.
  Test output relies on expose_php being on
  1.2 is a problematic float to print out Lower the default display precision for this test
  The test output is dependent on expose_php ini
  fix makefile in phpize mode
  fixe output_as_table() when no ext was enabled
  fix end of stream exception when generating makefile
  ...

Conflicts:
	ext/standard/http_fopen_wrapper.c
	ext/standard/string.c
	sapi/cli/php_cli_server.c
2014-07-14 11:44:53 +04:00
Daniel Lowrey
4bdb0120dc Merge branch 'PHP-5.6' 2014-07-12 10:57:30 -04:00
Daniel Lowrey
f3bf887e6d Bug #67609: TLS connections fail behind HTTP proxy 2014-07-12 10:51:44 -04:00
Tjerk Meesters
7de82eaeef Merge branch 'PHP-5.6' 2014-07-12 11:15:03 +08:00
Tjerk Meesters
18feaf9416 Merge branch 'PHP-5.5' into PHP-5.6 2014-07-12 11:10:15 +08:00
Tjerk Meesters
8757e2cab8 Merge branch 'PHP-5.4' into PHP-5.5 2014-07-12 11:08:50 +08:00
Tjerk Meesters
4fc0d46ae7 Fix for bug #34407 - ucwords and title case
Added support for ranges like trim() has
2014-07-12 10:44:11 +08:00
Dmitry Stogov
27f38798a1 Fast parameter parsing API
This API is experemental. It may be changed or removed.
It should be used only for really often used functions.
(Keep the original parsing code and wrap usage with #ifndef FAST_ZPP)
2014-07-11 16:32:20 +04:00
Dmitry Stogov
8f229b2855 Optimized array_map() and array_combine() 2014-07-11 12:28:36 +04:00
Xinchen Hui
d8431ba09c Merge branch 'master' into phpng 2014-07-09 18:35:30 +08:00
Anatol Belski
8b3cc726be Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Backported the patch from bug #67407 into 5.5+
  Backported the patch from bug #67407 into 5.4
  NEWS
  NEWS
  Fix Bug #67530 	error_log=syslog ignored

Conflicts:
	sapi/fpm/fpm/fpm_stdio.c
2014-07-08 09:57:36 +02:00
Anatol Belski
51f79846bf Backported the patch from bug #67407 into 5.5+ 2014-07-08 09:54:36 +02:00
Anatol Belski
03214a2aef Backported the patch from bug #67407 into 5.4 2014-07-08 09:52:35 +02:00
Anatol Belski
4883a60bb3 Merge branch 'pull-request/691' 2014-07-08 09:48:59 +02:00
Dmitry Stogov
2ed8a17045 Refactored run_time_cache usage in object handlers 2014-07-07 20:54:31 +04:00
Dmitry Stogov
bce6a36c8a Merge branch 'master' into test
* master: (48 commits)
  change locale - looks like not everybody has sl_SI
  Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone
  fix format
  Fix bug #67052 (NumberFormatter::parse() resets LC_NUMERIC setting)
  Make sure the generator script also creates a newline at the end of file
  Add newline at end of file to prevent compilation warning
  Fix handling of session user module custom handlers.
  Reference bug report instead of github issue in NEWS file
  add more exts for Travis
  Update NEWS
  Fix phpdbg.1 man page installation when build != src directory
  BFN for bug #67551 (php://input temp file will be located in sys_temp_dir instead of upload_tmp_dir)
  reorder
  restore API compatibility
  finish
  refactor php_stream_temp_create{,_ex} and use it for the php://input stream
  refactor _php_stream_fopen_{temporary_,tmp}file()
  fix length overflow of HTTP_RAW_POST_DATA
  Update NEWS
  Fixed bug #67215 (php-cgi work with opcache, may be segmentation fault happen)
  ...

Conflicts:
	ext/opcache/zend_accelerator_util_funcs.c
	ext/session/mod_user.c
	ext/spl/spl_array.c
	ext/spl/spl_dllist.c
	ext/standard/file.c
	ext/standard/streamsfuncs.c
	ext/standard/string.c
	main/streams/memory.c
2014-07-07 19:21:23 +04:00
Dmitry Stogov
6bf24f4dd0 Removed EG(active_symbol_table) and use corresponding value from EG(current_execute_data) 2014-07-04 18:03:45 +04:00
Michael Wallner
f9fda21667 Merge branch 'PHP-5.6'
* PHP-5.6:
  BFN for bug #67551 (php://input temp file will be located in sys_temp_dir instead of upload_tmp_dir)
  reorder
  restore API compatibility
  finish
  refactor php_stream_temp_create{,_ex} and use it for the php://input stream
  refactor _php_stream_fopen_{temporary_,tmp}file()
  fix length overflow of HTTP_RAW_POST_DATA

Conflicts:
	main/php_content_types.c
2014-07-03 20:43:12 +02:00
Michael Wallner
40bcd909d8 refactor php_stream_temp_create{,_ex} and use it for the php://input stream 2014-07-03 20:40:40 +02:00
Dmitry Stogov
c4d99ec982 Removed EG(called_scope) and use corresponding value from EG(current_execute_data) 2014-07-03 02:34:43 +04:00
Ferenc Kovacs
a1c63413cd Merge branch 'PHP-5.6'
* PHP-5.6:
  also add Remi to the QA credits
  add Stas and Julient to the QA credits
2014-07-02 23:36:00 +02:00
Ferenc Kovacs
6ca71b451e also add Remi to the QA credits 2014-07-02 23:35:31 +02:00
Ferenc Kovacs
58598ead2c add Stas and Julient to the QA credits 2014-07-02 23:32:50 +02:00
Ferenc Kovacs
f9b3494d99 Merge branch 'PHP-5.6'
* PHP-5.6:
  update the credits
2014-07-02 23:27:54 +02:00
Ferenc Kovacs
3be6f0dc79 update the credits 2014-07-02 23:26:41 +02:00
Dmitry Stogov
0a77dcd4b9 Removed EG(in_execution). If EG(currentent_execute_data) is not NULL we are executing something. 2014-07-03 01:02:25 +04:00
Nikita Popov
99b95f3eb2 Merge branch 'PHP-5.6' 2014-07-02 22:41:04 +02:00
Nikita Popov
a91d1bb9a3 Merge branch 'PHP-5.5' into PHP-5.6 2014-07-02 22:40:45 +02:00
Nikita Popov
213e9a0a3c Merge branch 'PHP-5.4' into PHP-5.5 2014-07-02 22:40:33 +02:00
Nikita Popov
18989420b6 Add test for bug #67151 2014-07-02 22:39:54 +02:00
Nikita Popov
2d4d36d2a0 Merge branch 'PHP-5.6' 2014-07-02 22:35:19 +02:00
Nikita Popov
4827806b9e Merge branch 'PHP-5.5' into PHP-5.6 2014-07-02 22:35:00 +02:00
Nikita Popov
8c4156ed28 Merge branch 'PHP-5.4' into PHP-5.5 2014-07-02 22:34:32 +02:00
Nikita Popov
3cc6bd10ac Fix bug #67151: strtr with empty array crashes 2014-07-02 22:33:20 +02:00
Dmitry Stogov
4b09dd69e6 Removed EG(active_op_array) and use corresponding value from EG(current_execute_data) 2014-07-02 22:03:21 +04:00
Michael Wallner
088eedfaa1 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix integer overflow in {stream,file}_{get,put}_contents()
2014-07-02 09:56:41 +02:00
Michael Wallner
122ee0a1cf Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix integer overflow in {stream,file}_{get,put}_contents()
2014-07-02 09:56:05 +02:00
Michael Wallner
1e06c73192 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix integer overflow in {stream,file}_{get,put}_contents()
2014-07-02 09:55:15 +02:00
Michael Wallner
34e686c556 fix integer overflow in {stream,file}_{get,put}_contents() 2014-07-02 09:53:03 +02:00
Xinchen Hui
96e3fd4c1d refcount in phpng has different meanings 2014-07-01 11:54:16 +08:00
Dmitry Stogov
acfbb7b6dc Merge branch 'master' into test
* master: (67 commits)
  remove the NEWS entry for the reverted fpm fix
  remove the NEWS entry for the reverted fpm fix
  remove the NEWS entry for the reverted fpm fix
  Revert "Fix Bug #67530 	error_log=syslog ignored"
  --enable-fpm for the travis build
  fix the last fpm NEWS entry, the other bug is related, but not the same what we fixed here
  NEWS
  NEWS
  Fix bug #67091: make install fails to install libphp5.so on FreeBSD 10.0
  adding NEWS entry for the fix for bug #65641
  Updated NEWS file for recent phpdbg fixes
  Fixed issue krakjoe/phpdbg#94 - List behavior is inconsistent
  Fix issue krakjoe/phpdbg#97 - list now appends a newline if there is none The prompt should always ensure it is on a newline
  Fixed test
  Inform about back command existence in help - Fixes krakjoe/phpdbg#100 No way to list the current stack/frames
  Fix issue krakjoe/phpdbg#98 break if does not seem to work
  Fix issue krakjoe/phpdbg#99 register function has the same behavior as run
  Fix readline/libedit (Thanks to @remicollet)
  Replace incorrect `E` command with `ev` in watch help
  Fix typo in `finish` help
  ...

Conflicts:
	Zend/zend_ast.c
	Zend/zend_highlight.c
	Zend/zend_indent.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/info.c
2014-07-01 00:19:41 +04:00
Xinchen Hui
46f4e9b56e IS_OBJECT and IS_RESOURCE is obviously exclusive 2014-06-26 18:29:25 +08:00
Stanislav Malyshev
b304a56685 Merge branch 'PHP-5.6'
* PHP-5.6:
  remove bug67072_2 test for 5.6+ since we'd have cleaner solution
  Fix test - because of big #67397 we don't allow overlong locales anymore
2014-06-24 11:24:40 -07:00
Stanislav Malyshev
78c3ca105b remove bug67072_2 test for 5.6+ since we'd have cleaner solution 2014-06-24 11:24:07 -07:00
Stanislav Malyshev
66cdd8fd76 Better fix for bug #67072 with more BC provisions 2014-06-24 10:32:33 -07:00
Stanislav Malyshev
3804c0d00f Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability 2014-06-24 10:32:12 -07:00
Stanislav Malyshev
cfe06eb2b1 Better fix for bug #67072 with more BC provisions 2014-06-24 10:30:03 -07:00
Stanislav Malyshev
84f9fe0fdc Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability 2014-06-24 10:29:26 -07:00
Stanislav Malyshev
e2ed4874b5 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  5.4.30
  Better fix for bug #67072 with more BC provisions
  Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability
  update CVE
  Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion
  Fix bug #67397 (Buffer overflow in locale_get_display_name->uloc_getDisplayName (libicu 4.8.1))
  Fix bug #67349: Locale::parseLocale Double Free
  add CVEs
  Fix potential segfault in dns_get_record()
  Fix bug #66127 (Segmentation fault with ArrayObject unset)
  5.4.30 rc1

Conflicts:
	ext/intl/locale/locale_methods.c
2014-06-24 10:25:09 -07:00
Stanislav Malyshev
3488cf6fd8 Merge branch 'PHP-5.4.30' into PHP-5.4
* PHP-5.4.30:
  5.4.30
  Better fix for bug #67072 with more BC provisions
  Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability
  update CVE
  Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion
  Fix bug #67397 (Buffer overflow in locale_get_display_name->uloc_getDisplayName (libicu 4.8.1))
  Fix bug #67349: Locale::parseLocale Double Free
  add CVEs
  Fix potential segfault in dns_get_record()
  Fix bug #66127 (Segmentation fault with ArrayObject unset)
  5.4.30 rc1

Conflicts:
	configure.in
	main/php_version.h
2014-06-24 10:23:36 -07:00
Stanislav Malyshev
6d97b4b2b3 Better fix for bug #67072 with more BC provisions 2014-06-23 22:16:25 -07:00
Stanislav Malyshev
fb0128af2a Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability 2014-06-23 00:22:59 -07:00
Stanislav Malyshev
342240fd7f Better fix for bug #67072 with more BC provisions 2014-06-21 21:30:34 -07:00
Stanislav Malyshev
c42d5cf5de Better fix for bug #67072 with more BC provisions 2014-06-21 21:29:11 -07:00
Dmitry Stogov
b108267f2c Merge branch 'master' into phpng
* master: (41 commits)
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  NEWS
  Fix Request #67453 Allow to unserialize empty data.
  Update copyright year to 2014
  Update copyright year for re2c generated files
  Update copyright year to 2014
  Update copyright year for re2c files as well
  Fix patch for bug #67436
  fix failed test
  Fix test on modern distro where old unsecure algo are disabled in openssl config. Testing recent algo should be enough to check this function.
  Added tests for bug 67436
  Fixed wrong XFAIL test - already fixed
  Fix typo in Bug #67406 NEWS entry
  Fix typo in Bug #67406 NEWS entry
  ...

Conflicts:
	Zend/zend_compile.c
	ext/session/session.c
	ext/standard/array.c
	ext/standard/http_fopen_wrapper.c
	tests/classes/bug63462.phpt
2014-06-18 17:50:27 +04:00
Lior Kaplan
6e0a9b4588 Merge branch 'PHP-5.6'
* PHP-5.6:
  Update copyright year to 2014
  Update copyright year for re2c generated files
  Update copyright year to 2014
  Update copyright year for re2c files as well
2014-06-16 23:36:39 +03:00
Lior Kaplan
11b18347d8 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Update copyright year for re2c generated files
  Update copyright year to 2014
  Update copyright year for re2c files as well
2014-06-16 23:32:10 +03:00
Lior Kaplan
c38b73a701 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Update copyright year for re2c generated files
  Update copyright year to 2014
  Update copyright year for re2c files as well
2014-06-16 23:30:44 +03:00
Lior Kaplan
6f3bcb0d6e Update copyright year for re2c generated files 2014-06-16 23:28:36 +03:00
Lior Kaplan
e667d23178 Update copyright year for re2c files as well 2014-06-16 23:26:50 +03:00
Sara Golemon
21525d0413 Fix potential segfault in dns_get_record()
If the remote sends us a packet with a malformed TXT record,
we could end up trying to over-consume the packet and wander
off into overruns.
2014-06-15 01:04:24 -07:00
Matteo Beccati
7d2bcbe20c Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix bug #67433 SIGSEGV when using count() on an object implementing Countable
2014-06-13 13:14:52 +02:00
Matteo Beccati
df5551ba4f Fix bug #67433 SIGSEGV when using count() on an object implementing Countable 2014-06-13 13:14:12 +02:00
Adam Harvey
64f85d5afa Merge branch 'PHP-5.6'
* PHP-5.6:
  Follow 308 Permanent Redirect responses.
2014-06-12 18:19:11 -07:00
Adam Harvey
84f339546a Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Follow 308 Permanent Redirect responses.
2014-06-12 18:17:18 -07:00
Adam Harvey
2546434008 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Follow 308 Permanent Redirect responses.
2014-06-12 18:15:07 -07:00
Adam Harvey
b51f82f260 Follow 308 Permanent Redirect responses.
Fixes bug #67430 (http:// wrapper doesn't follow 308 redirects).
2014-06-12 18:12:53 -07:00
Adam Harvey
a92e3eb0fe Merge branch 'PHP-5.6'
* PHP-5.6:
  Keep 308-399 HTTP response codes when header('Location:') is called.
2014-06-12 17:42:29 -07:00
Adam Harvey
82231b5d89 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Keep 308-399 HTTP response codes when header('Location:') is called.
2014-06-12 17:40:51 -07:00
Adam Harvey
aa3a5f7681 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Keep 308-399 HTTP response codes when header('Location:') is called.
2014-06-12 17:38:52 -07:00
Adam Harvey
1b9cbab9a7 Keep 308-399 HTTP response codes when header('Location:') is called.
Fixes bug #67428 (header('Location: foo') will override a 308-399 response
code).
2014-06-12 17:35:05 -07:00
Andrea Faulds
2b5d25d1fc Merge branch 'httponly-cookies' of https://github.com/mj/php-src 2014-06-12 10:03:14 +01:00
Dmitry Stogov
dd1c68e67f Merge branch 'master' into phpng
* master: (77 commits)
  NEWS entry for Fix potential segfault in dns_get_record()
  NEWS entry for "Fix potential segfault in dns_get_record()"
  NEWS entry for Fix potential segfault in dns_get_record(
  Fix potential segfault in dns_get_record()
  Revert "Add optional second arg to unserialize()"
  5.5.15 now
  update NEWS
  Fix bug #66127 (Segmentation fault with ArrayObject unset)
  5.4.31 next
  Add NEWS. This doesn't need UPGRADING (or an RFC), IMO.
  Fix broken test.
  Add a mime type map generation script and update the header.
  Move the mime type map out of php_cli_server.c for easier generation.
  Replace the CLI server's linear search for extensions with a hash table.
  fix test
  Remove unused included file
  NEWS
  NEWS
  NEWS
  Fixed Bug #67413 	fileinfo: cdf_read_property_info insufficient boundary chec
  ...

Conflicts:
	Zend/zend_closures.c
	Zend/zend_execute.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/spl/spl_array.c
	ext/standard/basic_functions.c
	ext/standard/dns.c
	ext/standard/var.c
2014-06-12 05:07:33 +04:00
Sara Golemon
b34d7849ed Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix potential segfault in dns_get_record()
2014-06-11 13:53:59 -07:00
Sara Golemon
e2ef56f760 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix potential segfault in dns_get_record()
2014-06-11 13:51:53 -07:00
Sara Golemon
1978f41c8a Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix potential segfault in dns_get_record()
2014-06-11 13:37:40 -07:00
Sara Golemon
4f73394fdd Fix potential segfault in dns_get_record()
If the remote sends us a packet with a malformed TXT record,
we could end up trying to over-consume the packet and wander
off into overruns.
2014-06-11 13:37:04 -07:00
Ferenc Kovacs
ec974c4397 Merge branch 'PHP-5.6'
* PHP-5.6:
  Revert "Add optional second arg to unserialize()"
2014-06-11 14:59:39 +02:00
Ferenc Kovacs
c38ab260fe Revert "Add optional second arg to unserialize()"
This reverts commit cfd1045822.
2014-06-11 14:43:09 +02:00
Christian Wenz
60cc43a279 Update info.c
Fixes #67407: Windows 8.1/Server 2012 R2 reported as Windows 8/Server 2012
2014-06-10 10:42:23 +02:00
Dmitry Stogov
7c045c61f0 Optimized for fast path 2014-06-10 00:15:44 +04:00
Stanislav Malyshev
b060880c87 Fixed bug #67399 (putenv with empty variable may lead to crash) 2014-06-08 23:10:44 -07:00
Stanislav Malyshev
336b5f59b6 Fixed bug #67399 (putenv with empty variable may lead to crash) 2014-06-08 23:10:04 -07:00
Stanislav Malyshev
4b0b032676 Fixed bug #67399 (putenv with empty variable may lead to crash) 2014-06-08 23:09:31 -07:00
Stanislav Malyshev
62857998c5 Fixed bug #67399 (putenv with empty variable may lead to crash) 2014-06-08 23:09:09 -07:00
Stanislav Malyshev
f22f665b47 Merge remote-tracking branch 'github/pr/677'
* github/pr/677:
  Test
  Fix grammar #2683
2014-06-08 14:02:20 -07:00
Dmitry Stogov
1593d942e7 Fixed compilation warnings 2014-06-05 20:58:21 +04:00
Dmitry Stogov
c1965f58d4 Use reference counting instead of zval duplication 2014-06-05 16:04:11 +04:00
Anatol Belski
e2710310a0 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed regression introduced by patch for bug #67072
2014-06-03 20:51:18 +02:00
Anatol Belski
20568e5028 Fixed regression introduced by patch for bug #67072
This applies to 5.4 and 5.5 only as a legacy fix.
2014-06-03 20:43:58 +02:00
Dmitry Stogov
30c05577f7 Optimized conditions order 2014-06-03 03:54:03 +04:00
Xinchen Hui
717b5661e7 Fixed merge 2014-06-01 23:14:31 +08:00
Xinchen Hui
91b2ddc816 Merge branch 'master' into phpng
Conflicts:
	ext/spl/spl_array.c
	ext/spl/spl_directory.c
	ext/standard/formatted_print.c
2014-06-01 22:43:06 +08:00
Dmitry Stogov
b3b616cf7e Introduced immutable arrays. They don't need to be copyed and may be used directly from SHM. 2014-05-29 18:21:56 +04:00
Nikita Popov
ccd9dab4c6 Fix $http_response_header creation 2014-05-29 12:51:03 +02:00
Nikita Popov
3831b39302 Use zval_get_string in implode
Also get rid of separate case for IS_OBJECT - this is already
handled by the default branch.
2014-05-28 18:45:00 +02:00
Nikita Popov
bf5a59d281 Use smart_str_append_long in implode 2014-05-28 18:39:41 +02:00
Dmitry Stogov
a1177760b4 Use extended iteration API to avoid in-place modification 2014-05-28 13:00:33 +04:00
Dmitry Stogov
cf603fb960 Reference counter in phpng may have a bit different meaning and must not be the same 2014-05-28 02:16:21 +04:00
Dmitry Stogov
6c4b30eb07 Use new zend_hash API 2014-05-28 02:13:45 +04:00
Stanislav Malyshev
cca9f376f4 Merge branch 'PHP-5.6'
* PHP-5.6:
  update NEWS
  Fix bug #67249: printf out-of-bounds read
  5.5.13 release date
2014-05-27 12:12:22 -07:00
Stanislav Malyshev
13a3826687 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  update NEWS
  Fix bug #67249: printf out-of-bounds read
  5.5.13 release date
2014-05-27 12:11:59 -07:00
Stanislav Malyshev
a2f8c9c1ae Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  update NEWS
  Fix bug #67249: printf out-of-bounds read
2014-05-27 12:10:41 -07:00
Stanislav Malyshev
091b7642c2 Fix bug #67249: printf out-of-bounds read 2014-05-27 11:28:22 -07:00
Dmitry Stogov
40256e0f9c Use specialized functions instead of macros 2014-05-26 17:16:16 +04:00
Xinchen Hui
922285ec55 Don't use cast (compiler friendly) 2014-05-26 11:05:04 +08:00
Nikita Popov
43cf92edf6 Fix in_array (strict) with references 2014-05-25 18:19:00 +02:00
Dmitry Stogov
9eb89dddb1 Use optimized zend_array_dup() function. convert zend_hash_num_elements() and zend_hash_next_free_element() into macros. 2014-05-23 20:37:53 +04:00
Nikita Popov
1d8c499b51 Optimize int to string conversion
Probably platform depedentant, but for me snprintf is terribly
slow.

The code for the long printing is taken from the smart string
API.
2014-05-23 13:10:50 +02:00
Xinchen Hui
82a4897446 Use new iterator macros 2014-05-19 10:55:09 +08:00
Dmitry Stogov
b11a30f5ea Merge branch 'master' into phpng
* master:
  Support for __debugInfo (Joe Watkins)
  Optimize ZEND_POW (Rouven Weßling)
  gcov: tentative fix for broken coverage data after fix for opcache coverage slightly hackish, but works. The idea is that we want to give priority to .gcda files in .libs dirs vs the files in the upper level dir
  gcov: tentative fix for broken coverage data after fix for opcache coverage slightly hackish, but works. The idea is that we want to give priority to .gcda files in .libs dirs vs the files in the upper level dir
  Prevent recursion in ZF2 Parameters class
  adding NEWS block for beta4
  5.4.30 next
  enable email notifications
  update NEWS
  update NEWS
  update NEWS
  - Updated to version 2014.3 (2014c)
  fix bug #67253: timelib_meridian_with_check out-of-bounds read
  Fix bug #67252: convert_uudecode out-of-bounds read
  Fix bug #67251 - date_parse_from_format out-of-bounds read
  Fix bug #67250 (iptcparse out-of-bounds read)

Conflicts:
	ext/opcache/zend_persist.c
	ext/spl/spl_array.c
2014-05-18 21:17:31 +04:00
Xinchen Hui
b0ecac6ba8 Fixed uninitialized used 2014-05-18 20:55:06 +08:00
Martin Jansen
068bf645e1 Remove usage of pointless COOKIE_SET_COOKIE constant. 2014-05-18 10:45:31 +02:00
Pierre Joye
5609bcc757 fix leak 2014-05-15 10:23:50 +02:00
Pierre Joye
6e84e4a28e unused local var 2014-05-15 10:12:02 +02:00
Pierre Joye
d8c6749649 RETURN_STRING takes the char* only now (always copied) 2014-05-15 09:56:20 +02:00
Pierre Joye
526c778e91 RETURN_STRING takes the char* only now 2014-05-15 09:54:52 +02:00
zborboa-google
ec7eccaaae Test 2014-05-14 13:11:51 -07:00
Pierre Joye
3ae86b9cce Merge branch 'phpng' of git.php.net:php-src into phpng
# By Stanislav Malyshev (15) and others
# Via Stanislav Malyshev (15) and others
* 'phpng' of git.php.net:php-src: (53 commits)
  Use defined macro
  Refactored tidy (all tests passes)
  Reverted wrong commit Xinchen, stop commit changed configs :) You may use environment variables to ovverride default settings
  Fixed reference counting, IS_REFERENCE and IS_INDIRECT support
  Terminate string Useproper hash function
  C89 compat
  Fixed curl_close() behavior
  In most user extensions functions like mysql_close() should use zend_list_close() instead of zend_list_delete(). This closes the actual connection and frees extension specific data structures, but doesn't free zend_reference structure that might be referenced from zval(s). This also doesn't decrement the resource reference counter.
  Fixed access to uninitialized data and attempt to double free
  Fixed safe resource close. It must not de deleted (just closed), because it still may be referenced from zval(s). This fixes few ext/ftp test memory failures detected with valgrind.
  Nested PCRE calls may clobber extra->mark and it has to be reinitailized This fixes invalid memory writes (detected with valgrind) in Zend/tests/closure_047.phpt and Zend/tests/closure_048.phpt.
  Added comment
  fix test - output can be chunked
  fix test
  fix test
  Fixed test for commit 997be125eb
  Add bug fix to NEWS
  Update UPGRADING according to bug fix
  fix test
  improve CURL tests to allow testing without separate server
  ...
2014-05-14 20:06:58 +02:00
Pierre Joye
01513976e7 ptr needed here 2014-05-14 20:05:54 +02:00
Stanislav Malyshev
3c107d6434 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix bug #67253: timelib_meridian_with_check out-of-bounds read
  Fix bug #67252: convert_uudecode out-of-bounds read
  Fix bug #67251 - date_parse_from_format out-of-bounds read
  Fix bug #67250 (iptcparse out-of-bounds read)
2014-05-13 17:04:44 -07:00
Stanislav Malyshev
292b2fd3b3 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix bug #67253: timelib_meridian_with_check out-of-bounds read
  Fix bug #67252: convert_uudecode out-of-bounds read
  Fix bug #67251 - date_parse_from_format out-of-bounds read
  Fix bug #67250 (iptcparse out-of-bounds read)
2014-05-13 17:03:50 -07:00
Stanislav Malyshev
a03a1ab88c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #67253: timelib_meridian_with_check out-of-bounds read
  Fix bug #67252: convert_uudecode out-of-bounds read
  Fix bug #67251 - date_parse_from_format out-of-bounds read
  Fix bug #67250 (iptcparse out-of-bounds read)

Conflicts:
	ext/date/lib/parse_date.c
	ext/date/lib/parse_date.re
2014-05-13 17:02:09 -07:00
Stanislav Malyshev
0094fd0969 Merge branch 'bug67252' into PHP-5.4
* bug67252:
  fix bug #67253: timelib_meridian_with_check out-of-bounds read
  Fix bug #67252: convert_uudecode out-of-bounds read
2014-05-13 16:47:27 -07:00
Stanislav Malyshev
9103c9eb4f Merge branch 'bug67250' into PHP-5.4
* bug67250:
  Fix bug #67250 (iptcparse out-of-bounds read)
2014-05-13 16:43:10 -07:00
Dmitry Stogov
7fcd4064c0 Merge branch 'master' into phpng
* master: (41 commits)
  fix test - output can be chunked
  fix test
  fix test
  Fixed test for commit 997be125eb
  Add bug fix to NEWS
  Update UPGRADING according to bug fix
  fix test
  improve CURL tests to allow testing without separate server
  improve CURL tests to allow testing without separate server
  Fixed bug #67199	mb_regex_encoding mishmash
  Fix bug #67248 (imageaffinematrixget missing check of parameters)
  Fix bug #67247	spl_fixedarray_resize integer overflow
  fix news
  add tests stuff to README
  Updated NEWS
  Fix Linux specific fail in error traces (cherry-picked and fix for bug #67245) Linux apparently does not like memcpy in overlapping regions...
  - Fixed off-by-one in phar_build (patch by crrodriguez at opensuse dot org)
  - Move checking
  - Fixed missing NULL check in SimpleXMLElement::xpath()
  - Fixed missing NULL check
  ...

Conflicts:
	ext/bz2/bz2.c
	ext/gd/gd.c
	ext/mbstring/php_mbregex.c
	ext/session/tests/031.phpt
	ext/simplexml/simplexml.c
	ext/spl/spl_fixedarray.c
2014-05-13 15:24:40 +04:00
Pierre Joye
c26d79c854 hash keys now use actual string length without leading zero 2014-05-13 08:11:44 +02:00
Xinchen Hui
7080131e71 This should be removed too 2014-05-13 13:55:51 +08:00
Xinchen Hui
97c836e421 Remove zval ** 2014-05-13 13:45:24 +08:00
Pierre Joye
11caa1d7b4 port dns_win32 2014-05-13 07:06:27 +02:00
Pierre Joye
dbc6d0df84 port proc_open to windows (untested yet) 2014-05-13 06:50:20 +02:00
Stanislav Malyshev
1e2818b143 Fix bug #67252: convert_uudecode out-of-bounds read 2014-05-11 20:29:27 -07:00
Stanislav Malyshev
3e9cb6a4a5 Fix bug #67250 (iptcparse out-of-bounds read) 2014-05-11 19:09:19 -07:00
Pierre Joye
486138ef3f Merge branch 'phpng' of git.php.net:php-src into phpng
# By Xinchen Hui (27) and others
# Via Xinchen Hui (5) and others
* 'phpng' of git.php.net:php-src: (47 commits)
  Refactor MySQLi (incompleted, only compilable now)
  Add support for pspell
  update for phpng
  Test push (previous push didn't send mail?)
  Added smart_string to avoid string duplicated
  Use strpprintf
  Added vstrpprintf strpprintf to avoid duplicate string
  Refactor sysvsem, sysvshm, sysmsg
  Fix identical comparison of arrays with references
  Fix strtr() segfault
  Code cleanup in proc_open
  Finish ext/curl (7 tests fails as trunk)
  Fixed post data (long type cast matters here :<)
  Use zend_string for better performance
  Fixed clone refcount
  Fixed build with high version libcurl
  Refactoring ext/curl (only compilable now)
  Fix proc_open resource destruction
  Support for ext/phar (incomplete)
  Finish bz2 (all tests passed)
  ...
2014-05-11 08:55:10 +02:00
Xinchen Hui
beb042090d Added smart_string to avoid string duplicated
for now, if we want result a char * use smart_string, if zend_string
 use smart_str
2014-05-10 11:09:17 +08:00
Xinchen Hui
b1c9d5ddee Use strpprintf 2014-05-10 00:43:02 +08:00
Nikita Popov
f1e1231529 Fix strtr() segfault 2014-05-09 15:14:27 +02:00
Nikita Popov
1616415056 Code cleanup in proc_open 2014-05-09 13:01:38 +02:00
Nikita Popov
b57d558d56 Fix proc_open resource destruction 2014-05-09 00:24:01 +02:00
Dmitry Stogov
fa7008bb24 Fixed resource destruction 2014-05-08 02:48:31 +04:00
Daniel Lowrey
b637946a23 Merge branch 'PHP-5.6'
* PHP-5.6:
  Allow crypto_method context value in stream_socket_enable_crypto()
2014-05-07 08:13:31 -06:00
Daniel Lowrey
27f5957e9f Bug #67224: stream_socket_enable_crypto()
- Allow crypto_method context value in stream_socket_enable_crypto()
- As of 5.6.x stream crypto type may be specified in the SSL context,
  making the $crypto_type parameter to stream_socket_enable_crypto()
  optional. This commit checks for a crypto type in the context prior
  to erroring out.
- Update NEWS/UPGRADING
2014-05-07 08:05:29 -06:00
Pierre Joye
670feb3a53 typo in var name 2014-05-07 11:17:03 +02:00
Martin Jansen
c5f9a231d5 Streamlining of cookie handling in ext/session and setcookie
Up until now the session cookie used "HttpOnly" to indicate cookies
only available through HTTP while setcookie() used "httponly".  The
relevant RFC 6265 claims that case does not matter for this token,
but only explicitely mentions "HttpOnly".  Thus this seems like a
logical choice when streamlining the code.

Also the setcookie implementation now uses the same string constants
as the session extension for other tokens like Max-Age or the domain
attribute.

This change poses a slight risk of backwards incompatibility in places
where people deliberately ignore chapter 5.2.5 of RFC 6265 and perform
case-sensitive checks for the HttpOnly attribute.
2014-05-06 22:00:59 +02:00
Michael Wallner
333638b0d3 remove useless indirection
the stream was initialized within the ops
in a prior version of the slim_post_data patch
2014-05-06 12:22:08 +02:00
Michael Wallner
5bdfa4d1c6 remove useless indirection
the stream was initialized within the ops
in a prior version of the slim_post_data patch
2014-05-06 12:21:43 +02:00
Dmitry Stogov
cd4b4dfc4d Merge branch 'master' into refactoring2
Conflicts:
	Zend/zend_hash.c
	ext/date/php_date.c
2014-05-05 13:02:43 +04:00
Xinchen Hui
72f46a34b8 Refactor zlib (all tests pass) 2014-05-05 15:52:09 +08:00
Xinchen Hui
cd00ea9993 Port iconv (all tests passes) 2014-05-05 13:58:23 +08:00
Anatol Belski
149568f4da Merge branch 'PHP-5.6'
* PHP-5.6:
  fixed ZEND_DEBUG usage
2014-05-05 00:51:40 +02:00
Anatol Belski
0d5121a3c7 fixed ZEND_DEBUG usage 2014-05-05 00:50:51 +02:00
Xinchen Hui
d8651fbe1c Make they are in the same style of Z_ISREF 2014-05-03 16:08:58 +08:00
Dmitry Stogov
17d027ed47 Split IS_BOOL into IS_FALSE and IS_TRUE 2014-04-30 18:32:42 +04:00
Marc Bennewitz
b547e1358d Improved logarithm of base 2 and 10 of standard math functions 2014-04-28 19:58:10 +02:00
Nikita Popov
7c93a7e078 Fix leak I introduced 2014-04-26 11:26:37 +02:00
Nikita Popov
dd419d24ca Replace more convert_to_* calls 2014-04-25 23:21:05 +02:00
Nikita Popov
b1b7939b0f Move more code to use zval_get_string 2014-04-25 23:21:04 +02:00
Dmitry Stogov
f9927a6c97 Merge mainstream 'master' branch into refactoring
During merge I had to revert:
	Nikita's patch for php_splice() (it probably needs to be applyed again)
	Bob Weinand's patches related to constant expression handling (we need to review them carefully)
	I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)

Conflicts:
	Zend/zend.h
	Zend/zend_API.c
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_constants.c
	Zend/zend_exceptions.c
	Zend/zend_execute.c
	Zend/zend_execute.h
	Zend/zend_execute_API.c
	Zend/zend_hash.c
	Zend/zend_highlight.c
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_variables.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/date/php_date.c
	ext/dom/documenttype.c
	ext/hash/hash.c
	ext/iconv/iconv.c
	ext/mbstring/tests/zend_multibyte-10.phpt
	ext/mbstring/tests/zend_multibyte-11.phpt
	ext/mbstring/tests/zend_multibyte-12.phpt
	ext/mysql/php_mysql.c
	ext/mysqli/mysqli.c
	ext/mysqlnd/mysqlnd_reverse_api.c
	ext/mysqlnd/php_mysqlnd.c
	ext/opcache/ZendAccelerator.c
	ext/opcache/zend_accelerator_util_funcs.c
	ext/opcache/zend_persist.c
	ext/opcache/zend_persist_calc.c
	ext/pcre/php_pcre.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/pdo_pgsql/pgsql_driver.c
	ext/pgsql/pgsql.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/array.c
	ext/standard/basic_functions.c
	ext/standard/html.c
	ext/standard/mail.c
	ext/standard/php_array.h
	ext/standard/proc_open.c
	ext/standard/streamsfuncs.c
	ext/standard/user_filters.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_variables.c
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_frame.c
	sapi/phpdbg/phpdbg_help.c
	sapi/phpdbg/phpdbg_list.c
	sapi/phpdbg/phpdbg_print.c
	sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Stanislav Malyshev
b82d077f98 Merge branch 'PHP-5.6'
* PHP-5.6:
  update NEWS
  update NEWS
  add a test case previously broken by a bad fix
  Revert "Fixed bug #64604"
2014-04-25 00:07:12 -07:00
Stanislav Malyshev
1bad4aa355 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  update NEWS
  add a test case previously broken by a bad fix
  Revert "Fixed bug #64604"
2014-04-25 00:00:20 -07:00
Stanislav Malyshev
f6841d250a Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  add a test case previously broken by a bad fix
  Revert "Fixed bug #64604"
2014-04-24 23:59:32 -07:00
Stanislav Malyshev
03c703b8bd add a test case previously broken by a bad fix 2014-04-24 23:58:38 -07:00
Stanislav Malyshev
a328803803 Revert "Fixed bug #64604"
This reverts commit b05c088a3a.
Breaks parsing urls where query has : in it, like: /foo/bar?baz=goo:boo
2014-04-24 23:50:45 -07:00
Dmitry Stogov
d0ed1212a4 Enable PCRE JIT compiler 2014-04-25 08:33:37 +04:00
Dmitry Stogov
df7ca608ce Optimized constant lookup 2014-04-25 00:56:15 +04:00
Dmitry Stogov
b1ff152782 Reimplement strtr() 2014-04-24 19:14:29 +04:00
Nikita Popov
08ae88157b Allocate zend_strings with correct size
For me (32bit) sizeof(zend_string) is 20, which means that the
char[1] array at the end is padded with three bytes. Thus allocating
based on sizeof(zend_string)-1 overallocates by those 3 padding bytes.

This commit fixes the allocation size, by using XtOffsetOf.
2014-04-23 19:34:51 +02:00
Dmitry Stogov
7584ae3200 Fixed compilaation warnings 2014-04-22 18:52:59 +04:00
Dmitry Stogov
5864ce8a44 Fixed compilation warnings 2014-04-22 17:46:34 +04:00
Dmitry Stogov
b886d9ce1e Use fast comparison function 2014-04-22 02:03:10 +04:00
Dmitry Stogov
4ed452c1b5 Convert zval_get_string() into "fast path" macro and "slow path" function 2014-04-21 22:36:01 +04:00
Dmitry Stogov
8ad8254a16 Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 2014-04-21 21:39:15 +04:00
Nikita Popov
0d43a277b8 Use zval_get_string in a few more places 2014-04-21 17:55:58 +02:00
Dmitry Stogov
72c287bd23 Combine HashTable.flags and HashTable.nApplyCount into single 32-bit word 2014-04-21 18:25:34 +04:00
Dmitry Stogov
dd464fb582 Use ZEND_HASH_FOREACH_* macros 2014-04-21 14:20:05 +04:00
Stanislav Malyshev
821cc39882 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix a compiler warning in php_rand.h
2014-04-20 16:36:55 -07:00
Stanislav Malyshev
5272d6c896 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix a compiler warning in php_rand.h
2014-04-20 16:36:36 -07:00
Stanislav Malyshev
8b903f24d5 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix a compiler warning in php_rand.h
2014-04-20 16:35:49 -07:00
Rouven Weßling
68283c9f4a Fix a compiler warning in php_rand.h 2014-04-20 16:35:36 -07:00
Stanislav Malyshev
dd9c80e44b Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix bug #65701: Do not use cache for file file copy
2014-04-20 15:27:55 -07:00
Stanislav Malyshev
774f16318b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #65701: Do not use cache for file file copy
2014-04-20 15:27:39 -07:00
Stanislav Malyshev
5addf223d5 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #65701: Do not use cache for file file copy
2014-04-20 15:25:03 -07:00
Boro Sitnikovski
a18cec1b86 Fix bug #65701: Do not use cache for file file copy 2014-04-20 15:22:44 -07:00
Dmitry Stogov
54d9ad53f4 More ZEND_HASH_FOREACH_* related changes 2014-04-19 00:08:14 +04:00
Dmitry Stogov
277f8f6391 ZEND_HASH_FOREACH_* usage 2014-04-18 21:49:07 +04:00
Dmitry Stogov
7652a977a8 Use ZEND_FETCH_FOREACH_* macros to iterate over HashTables instead of zend_hash_move_forward() and family. 2014-04-18 19:18:11 +04:00
Anatol Belski
f5f1abdc29 Merge branch 'PHP-5.6'
* PHP-5.6:
  refixed the test related to bug #67072
  Improved the fix for bug #67072, thanks Nikita
2014-04-18 15:17:39 +02:00
Anatol Belski
cfd20c90a5 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  refixed the test related to bug #67072
  Improved the fix for bug #67072, thanks Nikita
2014-04-18 15:17:12 +02:00
Anatol Belski
7c400dc867 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Improved the fix for bug #67072, thanks Nikita
2014-04-18 15:14:42 +02:00
Anatol Belski
c2acdbdd3d Improved the fix for bug #67072, thanks Nikita 2014-04-18 15:13:32 +02:00
Dmitry Stogov
e96073b1e4 Moved zend_literal->cache_slot right into zval.
It should be accessed using Z_CACHE_SLOT() macro.
zend_literal structure is removed.
API functions that accepted pointer to zend_literal now accept pointer to zval or cache_slot directly.
Calls of such functiond that now accept cache_slot need to be changed to pass -1 instead of NULL.
2014-04-17 15:40:45 +04:00
Anatol Belski
a381cc3c40 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  updated NEWS
  Fixed bug #67072 Echoing unserialized "SplFileObject" crash
2014-04-17 11:08:45 +02:00
Anatol Belski
f9a1eab435 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  updated NEWS
  Fixed bug #67072 Echoing unserialized "SplFileObject" crash
2014-04-17 11:07:22 +02:00
Anatol Belski
dc407c2402 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #67072 Echoing unserialized "SplFileObject" crash

Conflicts:
	ext/standard/var_unserializer.c
2014-04-17 11:05:21 +02:00
Anatol Belski
5328d42899 Fixed bug #67072 Echoing unserialized "SplFileObject" crash
The actual issue lays in the unserializer code which doesn't honor
the unserialize callback. By contrast, the serialize callback is
respected. This leads to the situation that even if a class has
disabled the serialization explicitly, user could still construct
a vulnerable string which would result bad things when trying
to unserialize.

This conserns also the classes implementing Serializable as well
as some core classes disabling serialize/unserialize callbacks
explicitly (PDO, SimpleXML, SplFileInfo and co). As of now, the
flow is first to call the unserialize callback (if available),
then call __wakeup. If the unserialize callback returns with no
success, no object is instantiated. This makes the scheme used
by internal classes effective, to disable unserialize just assign
zend_class_unserialize_deny as callback.
2014-04-17 10:48:14 +02:00
Dmitry Stogov
320bf772c6 Prevented modification of original name 2014-04-16 22:42:37 +04:00
Dmitry Stogov
3257dc09eb Prevented modification of interned string 2014-04-16 22:42:15 +04:00
Dmitry Stogov
a9aa5224e7 Prevented modification of interned string 2014-04-16 20:59:02 +04:00
Dmitry Stogov
1082489302 Fixed refcounting 2014-04-16 12:07:58 +04:00
Dmitry Stogov
153e549886 Fixed zend_string/char mess 2014-04-16 12:07:21 +04:00
Dmitry Stogov
6cf5e51f3e Reduced memory realocations 2014-04-15 22:43:18 +04:00
Dmitry Stogov
f9b26bc39a Cleanup (2-nd round) 2014-04-15 21:56:30 +04:00
Dmitry Stogov
050d7e38ad Cleanup (1-st round) 2014-04-15 15:40:40 +04:00
Dmitry Stogov
703c1bc570 Fixed passing arguments by reference into array_walk() callbacks. 2014-04-14 15:11:05 +04:00
Stanislav Malyshev
0a13f8168d Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #64604
2014-04-13 18:39:28 -07:00
Stanislav Malyshev
0d4c28f2e1 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #64604
2014-04-13 18:39:17 -07:00
Stanislav Malyshev
30ec1c0051 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64604
2014-04-13 18:38:36 -07:00
Ingo Walz
b05c088a3a Fixed bug #64604 2014-04-13 18:37:40 -07:00
Stanislav Malyshev
3a3a05d2e8 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix windows build
2014-04-13 17:04:25 -07:00
Stanislav Malyshev
04a11b850a Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix windows build
2014-04-13 17:04:00 -07:00
Stanislav Malyshev
df8e34bcc1 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix windows build
2014-04-13 17:03:28 -07:00
Stanislav Malyshev
3a2660b302 Fix windows build 2014-04-13 17:02:21 -07:00
Stanislav Malyshev
9fb92eed83 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix apr_psprintf format string from e0df4e3dba
  Fixed bug #67024 - getimagesize should recognize BMP files with negative height
2014-04-13 15:40:21 -07:00
Stanislav Malyshev
3aab84c100 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #67024 - getimagesize should recognize BMP files with negative height
2014-04-13 15:25:58 -07:00
Stanislav Malyshev
fe72caa6e5 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #67024 - getimagesize should recognize BMP files with negative height
2014-04-13 15:23:32 -07:00
Gabor Buella
1010200da5 Fixed bug #67024 - getimagesize should recognize BMP files with negative height 2014-04-13 15:17:04 -07:00
Bob Weinand
12844292b8 Merge branch 'PHP-5.6' 2014-04-14 00:10:25 +02:00
Bob Weinand
a93e734f81 Merge branch 'PHP-5.5' into PHP-5.6 2014-04-14 00:08:36 +02:00
Bob Weinand
bf3edbada6 Merge branch 'PHP-5.4' into PHP-5.5 2014-04-13 23:03:53 +02:00
Bob Weinand
beda5093b4 Reverted to 5a0da281e5
Discussion: http://news.php.net/php.cvs/76836
2014-04-13 23:01:31 +02:00
Bob Weinand
e8728b4999 Merge branch 'PHP-5.6' 2014-04-13 19:41:27 +02:00
Bob Weinand
3636a91adc Merge branch 'PHP-5.5' into PHP-5.6 2014-04-13 19:40:39 +02:00
Bob Weinand
191d9fc227 Merge branch 'PHP-5.4' into PHP-5.5 2014-04-13 19:37:06 +02:00
Bob Weinand
f07e37c96d Forgot title in phpt for bug #67064 2014-04-13 19:34:17 +02:00
Bob Weinand
ef214aa3c0 Merge branch 'PHP-5.6' 2014-04-13 19:28:32 +02:00
Bob Weinand
fb99409f89 Merge branch 'PHP-5.5' into PHP-5.6 2014-04-13 19:27:43 +02:00
Bob Weinand
eca0644e0a Merge branch 'PHP-5.4' into PHP-5.5 2014-04-13 19:25:07 +02:00
Bob Weinand
1a4a9eede5 Fix bug #67064 in a BC safe way
You can use an optional parameter now when implementing the Countable interface
to get the $mode passed to count().
2014-04-13 19:24:12 +02:00
Ferenc Kovacs
fdbf467d2e Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix bug #66568: the second arg for unserialize is optional.
2014-04-13 02:50:03 +02:00
Ferenc Kovacs
aefc8f22b3 Fix bug #66568: the second arg for unserialize is optional. 2014-04-13 02:49:35 +02:00
Dmitry Stogov
c6af3781ee Fixed test (now string data allocated together with zend_string structure) 2014-04-11 23:25:50 +04:00
Dmitry Stogov
affc7ab6c5 Fixed test (order of variables doesn't mater) 2014-04-11 23:04:47 +04:00
Bob Weinand
ccf863c8ce Merge branch 'PHP-5.6' 2014-04-11 19:35:11 +02:00
Bob Weinand
99d1a1bb3f Shut up, my lovely compiler; I do not like your warnings 2014-04-11 19:33:56 +02:00
Dmitry Stogov
a6123151c7 Fixed memory leak 2014-04-11 18:15:53 +04:00
Dmitry Stogov
aa2ed70d43 Fixed srialize() 2014-04-11 13:44:23 +04:00
Dmitry Stogov
c54768bd60 fixed serialize() 2014-04-10 22:44:39 +04:00
Dmitry Stogov
6bfedfd22e Fixed unserialize() 2014-04-10 18:08:11 +04:00
Dmitry Stogov
0ae14f3a1d Fixed access to uninitialized data 2014-04-10 10:38:40 +04:00
Dmitry Stogov
eb69fd9b0b Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 2014-04-10 03:22:06 +04:00
Dmitry Stogov
6ee5e813ab var_push_dtor_no_addref() is useles (var_push_dtor() doesn't work properly as well) 2014-04-10 01:49:26 +04:00
Nikita Popov
20f2e5986e Fix ZTS build
This only makes it compile, it doesn't actually work, presumably
because interned strings are assumed in some places.
2014-04-09 23:41:16 +02:00
Ferenc Kovacs
1b1dabcf60 Merge branch 'PHP-5.6'
* PHP-5.6:
  abstract namespace for unix sockets is a linux only feature
2014-04-09 19:04:35 +02:00
Ferenc Kovacs
cbcce72308 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  abstract namespace for unix sockets is a linux only feature
2014-04-09 19:02:56 +02:00
Ferenc Kovacs
e00e4b9334 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  abstract namespace for unix sockets is a linux only feature
2014-04-09 19:02:25 +02:00
Ferenc Kovacs
2c8aeda6dc abstract namespace for unix sockets is a linux only feature 2014-04-09 19:01:01 +02:00
Dmitry Stogov
b1d2efcc2d Fixed reference counting 2014-04-09 18:11:18 +04:00
Tjerk Meesters
939b2db87d Merge branch 'PHP-5.6' 2014-04-09 20:11:36 +08:00
Tjerk Meesters
16ae472769 Merge branch 'PHP-5.5' into PHP-5.6 2014-04-09 20:11:07 +08:00
Tjerk Meesters
287790d5c8 Don't test for specific non-zero substr_compare() return value 2014-04-09 20:10:34 +08:00
Dmitry Stogov
d9f6068fd3 Fixed GC 2014-04-09 15:26:45 +04:00
Dmitry Stogov
22ec682e77 Fixed reference counting 2014-04-09 15:05:22 +04:00
Nikita Popov
21e01f2b70 Merge branch 'PHP-5.6' 2014-04-09 12:31:35 +02:00
Nikita Popov
ad2ef3d97e Add only_integer_keys option to zend_hash_reindex
This allows to either do a full reindex, or only reindex the integer
keys.
2014-04-09 12:31:21 +02:00
Nikita Popov
f485c84a14 Don't always separate splice replacement array
Only perform separation when a typecast is done. Avoids doing a
full hash copy in many cases.
2014-04-09 12:31:21 +02:00
Nikita Popov
22d3eb3117 Add zend_hash_splice
This implements the original functionality of php_splice, but
as an in-place operation, thus avoiding copying the HT.

This is much faster (~10x) if the splice removes a small portion
of the array and doesn't insert many elements.
2014-04-09 12:31:21 +02:00
Nikita Popov
1aa8719e32 Add zend_hash_reindex
The implementation differs from the original in array.c in that it
rehashes the hashtable in the same loop. This is approximately two
times faster (not counting the rare case of a purely associative
array).
2014-04-09 12:31:21 +02:00
Tjerk Meesters
419d98b291 Merge branch 'PHP-5.6' 2014-04-09 07:37:07 +08:00
Tjerk Meesters
2aba2494f5 Merge branch 'PHP-5.5' into PHP-5.6 2014-04-09 07:34:49 +08:00
Tjerk Meesters
032921d80c Fixed bug 67043 2014-04-09 07:33:55 +08:00
Dmitry Stogov
3d17219cd8 Refactored zend_hash_* iteration API zend_hash_fove_forward_ex(ht, pos) and family require second argument to be real pointer.
&(ht)->nInternalPointer should be passed instead of NULL.
zend_hash_update_current_key() may work only with internal pointer.
2014-04-07 23:14:17 +04:00
Kalle Sommer Nielsen
96d5d7c240 Merge branch 'master' of https://git.php.net/push/php-src 2014-04-05 06:45:02 +02:00
Kalle Sommer Nielsen
91aa9fbb47 Remove call_user_method() and call_user_method_array() from master, long time deprecated in favour of call_user_func*(). 2014-04-05 06:43:41 +02:00
Dmitry Stogov
58f0f2503c Various VM optimizations 2014-04-04 02:52:53 +04:00
Dmitry Stogov
76cc99fe60 Refactored ZVAL flags usage to simplify various checks (e.g. Z_REFCOUNTED(), candidate for GC, etc) 2014-04-03 15:26:23 +04:00
Michael Wallner
3f8c45e28c Merge branch 'PHP-5.6'
* PHP-5.6:
  NEWS
  NEWS
  Fix bug #66182 	exit in stream filter produces segfault
2014-04-03 09:10:02 +02:00
Michael Wallner
5d42ce838c Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  Fix bug #66182 	exit in stream filter produces segfault
2014-04-03 09:09:24 +02:00
Michael Wallner
ba4fddd2da Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #66182 	exit in stream filter produces segfault
2014-04-03 09:08:35 +02:00
Michael Wallner
7ab5c593f7 Fix bug #66182 exit in stream filter produces segfault
Unfortunately, a segv caused by exit cannot be tested reliably.
2014-04-03 09:07:35 +02:00
Michael Wallner
4d412421df Merge branch 'PHP-5.6'
* PHP-5.6:
  NEWS
  NEWS
  Fixed bug #61019 (Out of memory on command stream_get_contents)
2014-04-02 15:39:16 +02:00
Michael Wallner
68c57f8149 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  Fixed bug #61019 (Out of memory on command stream_get_contents)
2014-04-02 15:38:35 +02:00
Michael Wallner
f453917f62 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #61019 (Out of memory on command stream_get_contents)
2014-04-02 15:37:50 +02:00
Michael Wallner
1ec83d44a1 Fixed bug #61019 (Out of memory on command stream_get_contents) 2014-04-02 15:36:39 +02:00
Dmitry Stogov
d8099d0468 Changed data layout to allow more efficient operations 2014-04-02 14:34:44 +04:00
Michael Wallner
1d6b3f1293 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix bug #64330
2014-04-02 11:11:39 +02:00
Michael Wallner
669459da8c Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #64330
2014-04-02 11:11:23 +02:00
Michael Wallner
af147ac9b7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #64330
2014-04-02 11:10:59 +02:00
Michael Wallner
91a9d24aa3 Fix bug #64330
stream_socket_server() creates wrong Abstract Namespace UNIX sockets
2014-04-02 11:09:26 +02:00
Dmitry Stogov
7240b4ec4d Avoid unnecessary zval separations 2014-04-02 01:56:16 +04:00
Dmitry Stogov
6b2ed577fd Avoid unnecessry reallocations 2014-04-01 22:36:17 +04:00
Dmitry Stogov
a25a1ba0ef STR_DUP() doesn't duplicate interned strings anymore. In case new string is required STR_INIT() or STR_ALLOC() should be used. 2014-04-01 16:31:03 +04:00
Xinchen Hui
35199a3d0c Fixed null pointer dereference 2014-03-30 17:53:17 +08:00
Xinchen Hui
6c16325034 Fixed smart_str_setl 2014-03-30 17:50:42 +08:00
Xinchen Hui
5c1595ca8e Refactor session (incompleted) 2014-03-29 17:39:26 +08:00
Xinchen Hui
3647fc6fcc Refactor session (incompleted) 2014-03-28 18:46:25 +08:00
Dmitry Stogov
ea85451b65 Refactored data structures to keep zend_object* instead of a whole zval in some places 2014-03-28 02:11:22 +04:00
Dmitry Stogov
5604cfbbba cleanup 2014-03-27 18:14:42 +04:00
Dmitry Stogov
c6cba55454 Use ZVAL_DEREF() macro 2014-03-27 13:39:09 +04:00
Yasuo Ohgaki
08cd3c6146 Merge branch 'PHP-5.6'
* PHP-5.6:
  Remove unneeded string copy. Allow to set ''(empty string values) internal/input/output_encoding for better compatibility. i.e. Runtime INI value changes. More compliance to the RFC. Improve/add encoding handling tests. i.e. Rather than set encoding automagic way, detect it.
2014-03-27 17:21:23 +09:00
Yasuo Ohgaki
a84e5dc37d Remove unneeded string copy.
Allow to set ''(empty string values) internal/input/output_encoding for better compatibility. i.e. Runtime INI value changes.
More compliance to the RFC. Improve/add encoding handling tests. i.e. Rather than set encoding automagic way, detect it.
2014-03-27 17:20:57 +09:00
Dmitry Stogov
54d559d893 Replaced (Z_TYPE(x) == IS_REFERENCE) with (Z_ISREF(x)) 2014-03-27 11:50:45 +04:00
Dmitry Stogov
f3272bf7ac Fixed extract() support IS_INDIRECT 2014-03-26 22:52:28 +04:00
Dmitry Stogov
de6a76d16e fixed support for references 2014-03-26 22:06:44 +04:00
Dmitry Stogov
887189ca31 Refactored IS_INDIRECT usage for CV and object properties to support HashTable resizing 2014-03-26 18:07:31 +04:00
Dmitry Stogov
e82f112468 Fixed test (scalar values don't have reference counters...) 2014-03-26 00:01:33 +04:00
Xinchen Hui
9e96c912fc Fixed smart_str0 for empty str(more friendly for user?) 2014-03-24 14:06:35 +08:00
Yasuo Ohgaki
8f5a31ff37 Add default_charset handling 2014-03-20 11:03:02 +09:00
Yasuo Ohgaki
e1fe76f28a Add default_charset handling 2014-03-20 10:50:32 +09:00
Dmitry Stogov
a6f09e48d7 Fixed memory leak 2014-03-20 01:05:06 +04:00
Dmitry Stogov
b7938ab1bd Refactored GC (incomplete) 2014-03-19 17:00:28 +04:00
Anatol Belski
6d6cce0f56 Merge branch 'PHP-5.6'
* PHP-5.6:
  remove obsolete comment
  Fixes to various stream cast on win64
2014-03-19 06:38:18 +01:00
Anatol Belski
ec11530620 remove obsolete comment 2014-03-19 06:35:58 +01:00
Anatol Belski
62f6c5853f Fixes to various stream cast on win64
This fixes further issues on win64 with casts from the streams.
Sockets/descriptors handling was unitized. This has an impact only on
win64, php_socket_t otherwise can be feed back to int datatype.
2014-03-19 06:33:46 +01:00
Dmitry Stogov
89ad91a8cc Fixed tests 2014-03-18 13:28:50 +04:00
Dmitry Stogov
6b6e903688 Fixed support for references 2014-03-18 13:20:11 +04:00
Mateusz Kocielski
1a5c51829a Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix phpdbg build on FreeBSD
  Fixed off-by-one in php_url_parse_ex
2014-03-18 10:03:06 +01:00
Mateusz Kocielski
888f467d63 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed off-by-one in php_url_parse_ex
2014-03-18 09:53:58 +01:00
Mateusz Kocielski
156cc39e21 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed off-by-one in php_url_parse_ex
2014-03-18 08:57:30 +01:00
Mateusz Kocielski
497b918e62 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed off-by-one in php_url_parse_ex

Conflicts:
	ext/standard/url.c
2014-03-18 08:54:57 +01:00
Dmitry Stogov
e47c080ce8 Fixed stream_filter_remove() 2014-03-18 11:50:22 +04:00
Mateusz Kocielski
46566b78c9 Fixed off-by-one in php_url_parse_ex
Change order of condition, previously pointer could be derefrenced before
bound check was done.
2014-03-18 08:48:41 +01:00
Dmitry Stogov
a7b33bb431 Fixed memory leak 2014-03-18 11:34:09 +04:00
Dmitry Stogov
1b2b7f410f Fixed URL scanner 2014-03-18 11:18:40 +04:00
Dmitry Stogov
dbc68b9b88 Fixed tests (scalar don't have reference counter, other values may get different counter values) 2014-03-18 01:16:12 +04:00
Dmitry Stogov
292c01d890 Fixed get_browser() 2014-03-18 00:55:25 +04:00
Dmitry Stogov
53a63dbd7d Fixed stream notifier 2014-03-18 00:08:50 +04:00
Dmitry Stogov
aa5f55306b Refactored EG(active_symbol_table) to be zend_array* instead of HashTable* 2014-03-17 23:15:22 +04:00
Xinchen Hui
3203c65c7c Fixed COUNT_RECURSIVE reference handling 2014-03-17 22:04:54 +08:00
Dmitry Stogov
62c448ab8b Fixed serialize/unserialize problems 2014-03-17 17:23:27 +04:00
Dmitry Stogov
c094fc11be Fixed refcounting 2014-03-14 15:54:49 +04:00
Dmitry Stogov
734db60eaa Fixed reference support 2014-03-14 12:50:20 +04:00
Dmitry Stogov
5f613c0d23 Fixed support for references 2014-03-14 12:14:59 +04:00
Dmitry Stogov
dd1bd54408 Fixed support for references 2014-03-13 23:23:20 +04:00
Dmitry Stogov
493d5adab5 Fixed test (scalars don;t have reference counter any more) 2014-03-13 23:04:30 +04:00
Dmitry Stogov
d708d3c596 Fixed passing arguments by reference from internal functions 2014-03-11 22:33:28 +04:00
Xinchen Hui
a38694be52 Fixed warning mesg 2014-03-10 10:49:53 +08:00
Xinchen Hui
43eaced19f All tests passed in ext/standard/tests/dir now 2014-03-09 20:10:02 +08:00
Xinchen Hui
2465f5c6d9 Use list_close here (by ext/standard/tests/dir/closedir_basic.phpt) 2014-03-09 20:08:06 +08:00
Xinchen Hui
661df93ea8 IS_REFERENCE is unfrequent 2014-03-09 20:03:24 +08:00
Xinchen Hui
9f3687d4db Use list_close here to fix ext/standard/tests/file/popen_pclose_basic.phpt 2014-03-09 19:56:48 +08:00
Xinchen Hui
b2b457a7e0 Fixed wrong addref usage in extract 2014-03-09 11:53:06 +08:00
Xinchen Hui
f1ed4f6bf9 Fixed parse_ini_file 2014-03-09 11:35:20 +08:00
Xinchen Hui
7668f7f95a Fixed double free in parse_ini_string 2014-03-09 11:06:06 +08:00
Xinchen Hui
3f794ba743 Improve codes 2014-03-07 22:33:36 +08:00
Dmitry Stogov
f0989e332f Fixed char*/zend_string* inconsistency 2014-03-07 18:23:57 +04:00
Xinchen Hui
5edbe296ef Fixed bug codes in stream_resolve_include_path.... 2014-03-07 18:01:22 +08:00
Nikita Popov
4c3454fbdc Merge branch 'PHP-5.6' 2014-03-06 23:15:37 +01:00
Nikita Popov
200c97829d Merge branch 'PHP-5.5' into PHP-5.6 2014-03-06 23:15:30 +01:00
Nikita Popov
ecf7570072 Merge branch 'PHP-5.4' into PHP-5.5 2014-03-06 23:12:41 +01:00