Commit Graph

8851 Commits

Author SHA1 Message Date
Bob Weinand
3c0adf2dcd Merge branch 'PHP-5.6' 2014-07-30 18:07:01 +02:00
Bob Weinand
d5ddd2dbb2 Disable restrictions regarding arrays in constants at run-time.
For the discussion around it, see the thread on the mailing list:
http://www.mail-archive.com/internals@lists.php.net/msg68245.html
2014-07-30 17:57:07 +02:00
Bob Weinand
354ee12b73 Revert "Fix bug #67064 in a BC safe way"
This reverts commit 1a4a9eede5.

Conflicts:
	ext/standard/array.c
	ext/standard/tests/array/bug67064.phpt
2014-07-30 17:18:05 +02:00
Tjerk Meesters
0dc88c45b8 Merge branch 'PHP-5.6'
* PHP-5.6:
  Updated NEWS for #67693
  Fixed bug #67693 - incorrect push to the empty array
2014-07-30 18:28:23 +08:00
Tjerk Meesters
f925892920 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Updated NEWS for #67693
  Fixed bug #67693 - incorrect push to the empty array
2014-07-30 18:27:29 +08:00
Tjerk Meesters
e9967292c3 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Updated NEWS for #67693
  Fixed bug #67693 - incorrect push to the empty array
2014-07-30 18:17:13 +08:00
Tjerk Meesters
da3add26cf Fixed bug #67693 - incorrect push to the empty array 2014-07-30 18:15:14 +08:00
Dmitry Stogov
dda7e84f10 Fixed ext/standard/tests/array/unexpected_array_mod_bug.phpt 2014-07-29 18:19:41 +04:00
Ferenc Kovacs
03dcdf5742 Merge branch 'PHP-5.6'
* PHP-5.6:
  Revert "Fix bug #66568: the second arg for unserialize is optional." as we already reverted the introduction of the second arg.
2014-07-25 13:16:31 +02:00
Ferenc Kovacs
a68ef0a117 Revert "Fix bug #66568: the second arg for unserialize is optional." as we already reverted the introduction of the second arg.
This reverts commit aefc8f22b3.

Conflicts:
	NEWS
2014-07-25 13:15:27 +02:00
Dmitry Stogov
9583a14e75 Fixed potential memory leaks 2014-07-22 20:55:54 +04:00
Lior Kaplan
ca273c31dd ZVAL_STRINGL takes only three variables
Follow up for commit f4cfaf36
2014-07-22 19:38:35 +03:00
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