Compare commits

..
100 Commits
Author SHA1 Message Date
Ferenc Kovacs c9e5f38e5b add missing NEWS entries 2015-06-10 09:42:27 +02:00
Yasuo Ohgaki 13fbd03e9b Fixed bug #68776 2015-06-10 09:30:53 +02:00
Stanislav Malyshev a6d7dd302c fix test 2015-06-10 09:30:01 +02:00
Stanislav Malyshev d2ac264ffe Fix bug #69646 OS command injection vulnerability in escapeshellarg 2015-06-10 09:29:11 +02:00
Stanislav Malyshev 8fc52d77d6 Fix #69719 - more checks for nulls in paths 2015-06-10 09:28:46 +02:00
Remi Collet 07fb924c22 fix test description 2015-06-10 09:25:20 +02:00
George Wang 68722deccf Fixed Buf #68812 Unchecked return value. 2015-06-10 09:24:03 +02:00
Ferenc Kovacs f8d2726267 5.6.10 2015-06-09 13:58:57 +02:00
Ferenc Kovacs c6dc3fc7f4 fix NEWS 2015-06-09 13:58:06 +02:00
Stanislav Malyshev c056c5801c Update PCRE version (bug #69689) 2015-06-09 13:47:28 +02:00
Ferenc Kovacs a54f5aa2ae fix NEWS 2015-06-09 13:42:16 +02:00
Lior Kaplan 0881b98d82 Upgrade bundled sqlite to 3.8.10.2
Includes fixes for CVE-2015-3414, CVE-2015-3415, CVE-2015-3416 done in 3.8.9
2015-06-09 13:21:58 +02:00
Stanislav Malyshev 8b7149636a improve fix for Bug #69545 2015-06-01 10:49:19 +02:00
Ferenc Kovacs 5845f309b7 PHP-5.6.10RC1 2015-05-28 02:11:32 +02:00
Xinchen Hui 1f077cc4f4 Merge branch 'PHP-5.5' into PHP-5.6 2015-05-26 16:24:39 +08:00
Xinchen Hui 76a290d0be Fixed C89 2015-05-26 16:24:18 +08:00
Remi Collet c630779648 NEWS 2015-05-24 09:39:44 +02:00
Remi Collet 565de1ae64 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  Fixed Bug #69479 GD fails to build with newer libvpx
2015-05-24 09:39:20 +02:00
Remi Collet 4cab20bbb4 NEWS 2015-05-24 09:39:03 +02:00
Remi Collet e807e07bfa Fixed Bug #69479 GD fails to build with newer libvpx
From upstream https://github.com/libgd/libgd/commit/d41eb72cd4545c394578332e5c102dee69e02ee8

Fix build with latest libvpx 1.4.0

These new constants exist at least since 1.0.0
Compatibility ones have been droped in 1.4.0
2015-05-24 09:37:12 +02:00
Anatol Belski 4e002b4412 updated NEWS 2015-05-23 23:02:09 +02:00
Anatol Belski f3cec08e65 increase the internal post data buffer
This brings speedup and fixes issues with var parsing. Default BUFSIZ
on Windows is 512 bytes which causes too much reallocation work.
2015-05-23 18:44:39 +02:00
Anatol Belski 0bc3a74334 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix test
2015-05-22 21:27:19 +02:00
Anatol Belski d9c266f4c9 fix test
Sometimes the path is unixified, sometimes not, so better don't
care about the slash in this case.
2015-05-22 21:25:52 +02:00
Lior Kaplan 2e2cbcc926 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Add entry for bug #69354, fixed in 5.5.25
  Add entry about PCRE upgrade (rev 95fa7279)
  Add CVE for bugs in 5.5.25
2015-05-22 11:18:32 +03:00
Lior Kaplan 827d2c1415 Add entry for bug #69354, fixed in 5.5.25 2015-05-22 11:17:01 +03:00
Lior Kaplan f736934af0 Add CVE for bugs in 5.6.9 2015-05-22 11:15:36 +03:00
Lior Kaplan 7ecab5d23f Add entry about PCRE upgrade (rev 95fa7279) 2015-05-22 11:02:01 +03:00
Lior Kaplan c9ac441fe8 Add CVE for bugs in 5.5.25 2015-05-22 10:58:28 +03:00
Remi Collet 68e368ed34 NEWS 2015-05-21 14:07:02 +02:00
Remi Collet 17d5ebe76e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #69680 (phar symlink in binary directory broken).
  Make the phar symlink relative
2015-05-21 14:06:26 +02:00
Remi Collet a7de68f98a Fixed bug #69680 (phar symlink in binary directory broken).
Relative symlink are better, as relative to link directory.
2015-05-21 14:05:15 +02:00
ponce c3d983f3af Make the phar symlink relative
or we got a symlink pointing to the build files
thanks also to remicollet
2015-05-21 14:03:18 +02:00
Anatol Belski 4fe938b0a9 remove duplicated declaration, fix build 2015-05-21 10:56:14 +02:00
Anatol Belski e85653051a updated NEWS 2015-05-21 09:47:59 +02:00
Anatol Belski fc94fb3e5b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  updated NEWS
  added missing GLOB_BRACE support check
  added SKIPIF section to test to make sure that GLOB_BRACE is supported
  fix #69628: complex GLOB_BRACE fails on Windows
  added PHPT to check for bug #69628
2015-05-21 09:47:30 +02:00
Anatol Belski c507c533bd updated NEWS 2015-05-21 09:47:02 +02:00
Christoph M. Becker 96629091a6 added missing GLOB_BRACE support check 2015-05-21 09:44:18 +02:00
Christoph M. Becker 6895ae4553 added SKIPIF section to test to make sure that GLOB_BRACE is supported 2015-05-21 09:44:17 +02:00
Christoph M. Becker 8c6e8e7870 fix #69628: complex GLOB_BRACE fails on Windows 2015-05-21 09:44:15 +02:00
Christoph M. Becker 90aee01c85 added PHPT to check for bug #69628 2015-05-21 09:44:14 +02:00
Anatol Belski ad4d022bdf Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix handling VAR vs VAR= in putenv
2015-05-21 08:21:53 +02:00
Anatol Belski 75286ece1a fix handling VAR vs VAR= in putenv
using _putenv_s eliminates behavior diff in TS/NTS
2015-05-21 08:19:54 +02:00
Remi Collet 59a78d48f0 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  move test
2015-05-20 14:02:25 +02:00
Remi Collet 3be4e5d71a move test 2015-05-20 14:02:13 +02:00
Remi Collet f228bc5230 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix new test
2015-05-20 08:30:44 +02:00
Remi Collet 716fe10d97 fix new test 2015-05-20 08:30:27 +02:00
Remi Collet 6da4feac35 NEWS 5.6 2015-05-20 08:11:55 +02:00
Remi Collet e41a2009d6 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS 5.5
  Fixed Bug #69667 segfault in php_pgsql_meta_data
  fix test output (32bits)
2015-05-20 08:11:24 +02:00
Remi Collet 4bda39b81d NEWS 5.5 2015-05-20 08:11:14 +02:00
Remi Collet 2cc4e69cc6 Fixed Bug #69667 segfault in php_pgsql_meta_data
Incomplete fix for #68741
2015-05-20 08:08:41 +02:00
Ferenc Kovacs 4c5efc7456 fix NEWS 2015-05-15 01:08:50 +02:00
Remi Collet 58e5e006e5 fix test output (32bits) 2015-05-14 10:28:59 +02:00
Ferenc Kovacs e09a0b74d9 fix release dates for 5.6.9/5.6.10. spotted by @Jan-E on github 2015-05-13 15:29:08 +02:00
Julien Pauli 8fc4c9444f Updated NEWS 2015-05-13 14:29:53 +02:00
Julien Pauli 7c5de1e99e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Updated NEWS
2015-05-13 14:29:29 +02:00
Julien Pauli dcd230de11 Updated NEWS 2015-05-13 14:29:02 +02:00
Julien Pauli c09fad97d6 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Close fd at the end, otherwise people complain
  Add file descriptor caching to mcrypt_create_iv()
2015-05-13 14:19:04 +02:00
Leigh f7952b90ca Close fd at the end, otherwise people complain
Even though it's closed when the process terminates!
2015-05-13 14:18:32 +02:00
Leigh c02c4aca00 Add file descriptor caching to mcrypt_create_iv()
This improves performance for applications that make repeated calls to
mcrypt_create_iv()
2015-05-13 14:18:32 +02:00
Julien Pauli 1b12982d39 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Updated NEWS
2015-05-13 13:06:08 +02:00
Julien Pauli 43c24da166 Updated NEWS 2015-05-13 13:05:46 +02:00
Stanislav Malyshev 587ddf6ddc Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix format
  update NEWS
  Add test for bug #69522
  Update tests
  Fix bug #69522 - do not allow int overflow
  Forgot test file
  Fix bug #69403 and other int overflows
  Fixed bug #69418 - more s->p fixes for filenames
  Fixed bug #69364 - use smart_str to assemble strings
  Fix bug #69453 - don't try to cut empty string
  Fix bug #69545 - avoid overflow when reading list

Conflicts:
	ext/standard/pack.c
2015-05-12 14:26:06 -07:00
Stanislav Malyshev c08f9c2c78 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix format
  update NEWS
  Add test for bug #69522
  Update tests
  Fix bug #69522 - do not allow int overflow
  Forgot test file
  Fix bug #69403 and other int overflows
  Fixed bug #69418 - more s->p fixes for filenames
  Fixed bug #69364 - use smart_str to assemble strings
  Fix bug #69453 - don't try to cut empty string
  Fix bug #69545 - avoid overflow when reading list

Conflicts:
	ext/pcntl/pcntl.c
	ext/standard/basic_functions.c
	ext/standard/pack.c
	ext/standard/tests/dir/opendir_variation1-win32.phpt
2015-05-12 14:24:15 -07:00
Stanislav Malyshev f473ea5464 fix format 2015-05-12 12:37:28 -07:00
Stanislav Malyshev 2f83797a0c update NEWS 2015-05-12 12:17:54 -07:00
Julien Pauli adbb301a70 Updated NEWS 2015-05-12 16:13:39 +02:00
Julien Pauli 2ddb560c2e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix for #66048
2015-05-12 16:12:51 +02:00
Julien Pauli c117548ea9 Fix for #66048 2015-05-12 16:12:29 +02:00
Nikita Popov e1cb22a23e Fix bug #69599 2015-05-12 15:08:12 +02:00
Stanislav Malyshev 9c0813fd48 Add test for bug #69522 2015-05-11 01:10:35 -07:00
Stanislav Malyshev 634aa0a2db Update tests 2015-05-11 00:12:39 -07:00
Stanislav Malyshev ba1d9cc4b7 Fix bug #69522 - do not allow int overflow 2015-05-10 23:06:08 -07:00
Stanislav Malyshev e2bbf0a2df Forgot test file 2015-05-10 02:24:29 -07:00
Stanislav Malyshev c591f022f8 Fix bug #69403 and other int overflows 2015-05-10 02:20:08 -07:00
Stanislav Malyshev be9b2a95ad Fixed bug #69418 - more s->p fixes for filenames 2015-05-10 02:09:38 -07:00
Stanislav Malyshev 4605d536d2 Fixed bug #69364 - use smart_str to assemble strings 2015-05-09 23:04:25 -07:00
Stanislav Malyshev 33594b78ec Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix #48147 - implement manual handling of  //IGNORE for broken libc
2015-05-09 18:57:18 -07:00
Stanislav Malyshev 473ec539a1 Fix #48147 - implement manual handling of //IGNORE for broken libc
Conflicts:
	ext/iconv/iconv.c
2015-05-09 18:54:40 -07:00
Dmitry Stogov 329513c3a7 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #69549 (Memory leak with opcache.optimization_level=0xFFFFFFFF)

Conflicts:
	NEWS
2015-05-07 12:16:40 +03:00
Dmitry Stogov 8026001943 Fixed bug #69549 (Memory leak with opcache.optimization_level=0xFFFFFFFF) 2015-05-07 12:14:14 +03:00
Remi Collet ac3ca0280a Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Relax tests failing on i386 with new zic
2015-05-05 11:23:13 +02:00
Remi Collet 33e2aa452d Relax tests failing on i386 with new zic 2015-05-05 11:22:29 +02:00
Rasmus Lerdorf 741382d968 Remove SSLv3 test dependencies
SSLv3 is going away. Debian8 already ships with an openssl
with no SSLv3 support which was causing these tests to fail.

Conflicts:
	ext/openssl/tests/session_meta_capture.phpt
2015-05-05 10:40:55 +02:00
Xinchen Hui ba1c78c410 Merge branch 'PHP-5.6' of git.php.net:php-src into PHP-5.6 2015-05-05 11:06:23 +08:00
Xinchen Hui 24992a1422 Merge branch 'PHP-5.5' into PHP-5.6 2015-05-05 11:06:14 +08:00
Xinchen Hui cf3e976c3b Update version 2015-05-05 11:06:04 +08:00
Anatol Belski c4f8dd9071 add config vars for phpize 2015-05-04 15:59:14 +02:00
Xinchen Hui 7289981c61 Merge branch 'PHP-5.5' into PHP-5.6 2015-05-04 19:22:22 +08:00
Xinchen Hui 7af9ba23a7 Saving the latter checking in most cases 2015-05-04 19:21:54 +08:00
Xinchen Hui e49a0e17b7 Merge branch 'PHP-5.5' into PHP-5.6 2015-05-04 10:34:48 +08:00
Xinchen Hui fff921d7a3 Update NEWS 2015-05-04 10:34:39 +08:00
John Boehr 9708378d13 Fix uninitialized value with extension traits 2015-05-04 10:33:39 +08:00
John Boehr 56fdae9018 Fix uninitialized value with extension traits 2015-05-04 10:33:26 +08:00
Stanislav Malyshev c27f012b7a Fix bug #69453 - don't try to cut empty string 2015-04-29 22:51:43 -07:00
Stanislav Malyshev ac28329354 Fix bug #69545 - avoid overflow when reading list 2015-04-29 22:50:18 -07:00
Stanislav Malyshev 428d0983cd Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Upgrade to PCRE 8.37 due to various bugfixes
2015-04-29 22:28:04 -07:00
Stanislav Malyshev ce6db558f9 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Upgrade to PCRE 8.37 due to various bugfixes
2015-04-29 22:27:21 -07:00
Stanislav Malyshev 95fa727992 Upgrade to PCRE 8.37 due to various bugfixes 2015-04-29 22:27:07 -07:00
Ferenc Kovacs 9c7496e0dd 5.6.10 will be next 2015-04-30 00:01:55 +02:00
46 changed files with 5621 additions and 2326 deletions

No files matched your search

+60 -6
View File
@@ -1,5 +1,56 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
11 Jun 2015, PHP 5.6.10
- Core:
. Fixed bug #66048 (temp. directory is cached during multiple requests).
(Julien)
. Fixed bug #69566 (Conditional jump or move depends on uninitialised value
in extension trait). (jbboehr at gmail dot com)
. Fixed bug #69599 (Strange generator+exception+variadic crash). (Nikita)
. Fixed bug #69628 (complex GLOB_BRACE fails on Windows).
(Christoph M. Becker)
. Fixed POST data processing slowdown due to small input buffer size
on Windows. (Jorge Oliveira, Anatol)
. Fixed bug #69646 (OS command injection vulnerability in escapeshellarg).
(Anatol Belski)
. Fixed bug #69719 (Incorrect handling of paths with NULs). (Stas)
- FTP
. Improved fix for bug #69545 (Integer overflow in ftp_genlist()
resulting in heap overflow). (Max Spelsberg)
- GD:
. Fixed bug #69479 (GD fails to build with newer libvpx). (Remi)
- Iconv:
. Fixed bug #48147 (iconv with //IGNORE cuts the string). (Stas)
- Litespeed SAPI:
. Fixed bug #68812 (Unchecked return value). (George Wang)
- Mail:
. Fixed bug #68776 (mail() does not have mail header injection prevention for
additional headers). (Yasuo)
- MCrypt:
. Added file descriptor caching to mcrypt_create_iv() (Leigh)
- Opcache
. Fixed bug #69549 (Memory leak with opcache.optimization_level=0xFFFFFFFF).
(Laruence, Dmitry)
- Phar:
. Fixed bug #69680 (phar symlink in binary directory broken).
(Matteo Bernardini, Remi)
- Postgres:
. Fixed bug #69667 (segfault in php_pgsql_meta_data). (Remi)
- Sqlite3:
. Upgrade bundled sqlite to 3.8.10.2. (CVE-2015-3414, CVE-2015-3415,
CVE-2015-3416) (Kaplan)
14 May 2015, PHP 5.6.9
- Core:
@@ -15,15 +66,17 @@ PHP NEWS
(Nikita)
. Fixed bug #69472 (php_sys_readlink ignores misc errors from
GetFinalPathNameByHandleA). (Jan Starke)
. Fixed bug #69364 (PHP Multipart/form-data remote dos Vulnerability). (Stas)
. Fixed bug #69364 (PHP Multipart/form-data remote dos Vulnerability).
(CVE-2015-4024) (Stas)
. Fixed bug #69403 (str_repeat() sign mismatch based memory corruption).
(Stas)
. Fixed bug #69418 (CVE-2006-7243 fix regressions in 5.4+). (Stas)
. Fixed bug #69418 (CVE-2006-7243 fix regressions in 5.4+). (CVE-2015-4025)
(Stas)
. Fixed bug #69522 (heap buffer overflow in unpack()). (Stas)
- FTP:
. Fixed bug #69545 (Integer overflow in ftp_genlist() resulting in heap
overflow). (Stas)
overflow). (CVE-2015-4022) (Stas)
- ODBC:
. Fixed bug #69354 (Incorrect use of SQLColAttributes with ODBC 3.0).
@@ -38,14 +91,15 @@ PHP NEWS
(Daniel Lowrey)
- PCNTL:
. Fixed bug #68598 (pcntl_exec() should not allow null char). (Stas)
. Fixed bug #68598 (pcntl_exec() should not allow null char). (CVE-2015-4026)
(Stas)
- PCRE
. Upgraded pcrelib to 8.37.
. Upgraded pcrelib to 8.37. (CVE-2015-2325, CVE-2015-2326)
- Phar:
. Fixed bug #69453 (Memory Corruption in phar_parse_tarfile when entry
filename starts with null). (Stas)
filename starts with null). (CVE-2015-4021) (Stas)
16 Apr 2015, PHP 5.6.8
+21
View File
@@ -0,0 +1,21 @@
--TEST--
Bug #69599: Strange generator+exception+variadic crash
--FILE--
<?php
function crash() {
sin(...[0]);
throw new \Exception();
yield;
}
iterator_to_array(crash());
?>
--EXPECTF--
Fatal error: Uncaught exception 'Exception' in %s:%d
Stack trace:
#0 [internal function]: crash()
#1 %s(%d): iterator_to_array(Object(Generator))
#2 {main}
thrown in %s on line %d
+1 -1
View File
@@ -4101,7 +4101,7 @@ static int zend_fixup_trait_method(zend_function *fn, zend_class_entry *ce TSRML
if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
ce->ce_flags |= ZEND_ACC_IMPLICIT_ABSTRACT_CLASS;
}
if (fn->op_array.static_variables) {
if (fn->type == ZEND_USER_FUNCTION && fn->op_array.static_variables) {
ce->ce_flags |= ZEND_HAS_STATIC_IN_METHODS;
}
}
+5 -6
View File
@@ -1887,7 +1887,7 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
EX(call)--;
zend_vm_stack_clear_multiple(1 TSRMLS_CC);
zend_vm_stack_clear_multiple(0 TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
@@ -2075,7 +2075,7 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
EX(call)--;
zend_vm_stack_clear_multiple(1 TSRMLS_CC);
zend_vm_stack_clear_multiple(0 TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
@@ -5425,7 +5425,6 @@ ZEND_VM_HANDLER(153, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, UNUSED)
{
USE_OPLINE
zend_function *op_array;
int closure_is_static, closure_is_being_defined_inside_static_context;
SAVE_OPLINE();
@@ -5434,9 +5433,9 @@ ZEND_VM_HANDLER(153, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, UNUSED)
zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
}
closure_is_static = op_array->common.fn_flags & ZEND_ACC_STATIC;
closure_is_being_defined_inside_static_context = EX(prev_execute_data) && EX(prev_execute_data)->function_state.function->common.fn_flags & ZEND_ACC_STATIC;
if (closure_is_static || closure_is_being_defined_inside_static_context) {
if (UNEXPECTED((op_array->common.fn_flags & ZEND_ACC_STATIC) ||
(EX(prev_execute_data) &&
EX(prev_execute_data)->function_state.function->common.fn_flags & ZEND_ACC_STATIC))) {
zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(called_scope), NULL TSRMLS_CC);
} else {
zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(scope), EG(This) TSRMLS_CC);
+5 -6
View File
@@ -459,7 +459,7 @@ static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
EX(call)--;
zend_vm_stack_clear_multiple(1 TSRMLS_CC);
zend_vm_stack_clear_multiple(0 TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
@@ -647,7 +647,7 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
EX(call)--;
zend_vm_stack_clear_multiple(1 TSRMLS_CC);
zend_vm_stack_clear_multiple(0 TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
@@ -6801,7 +6801,6 @@ static int ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER
{
USE_OPLINE
zend_function *op_array;
int closure_is_static, closure_is_being_defined_inside_static_context;
SAVE_OPLINE();
@@ -6810,9 +6809,9 @@ static int ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER
zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
}
closure_is_static = op_array->common.fn_flags & ZEND_ACC_STATIC;
closure_is_being_defined_inside_static_context = EX(prev_execute_data) && EX(prev_execute_data)->function_state.function->common.fn_flags & ZEND_ACC_STATIC;
if (closure_is_static || closure_is_being_defined_inside_static_context) {
if (UNEXPECTED((op_array->common.fn_flags & ZEND_ACC_STATIC) ||
(EX(prev_execute_data) &&
EX(prev_execute_data)->function_state.function->common.fn_flags & ZEND_ACC_STATIC))) {
zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(called_scope), NULL TSRMLS_CC);
} else {
zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(scope), EG(This) TSRMLS_CC);
+1 -1
View File
@@ -119,7 +119,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=6
PHP_RELEASE_VERSION=9
PHP_RELEASE_VERSION=10
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
+2 -2
View File
@@ -61,7 +61,7 @@ array\(11\) {
\["mday"\]=>
int\((9|14|23)\)
\["wday"\]=>
int\(0\)
int\((0|6)\)
\["mon"\]=>
int\((10|12)\)
\["year"\]=>
@@ -69,7 +69,7 @@ array\(11\) {
\["yday"\]=>
int\((282|347|295)\)
\["weekday"\]=>
string\(6\) "Sunday"
string\((6|8)\) "(Sunday|Saturday)"
\["month"\]=>
string\((7|8)\) "(October|December)"
\[0\]=>
+2 -2
View File
@@ -87,7 +87,7 @@ array\(9\) {
\[5\]=>
int\((104|1|-3843)\)
\[6\]=>
int\(6\)
int\((5|6)\)
\[7\]=>
int\((281|346|294)\)
\[8\]=>
@@ -107,7 +107,7 @@ array\(9\) {
\["tm_year"\]=>
int\((104|1|-3843)\)
\["tm_wday"\]=>
int\(6\)
int\((5|6)\)
\["tm_yday"\]=>
int\((281|346|294)\)
\["tm_isdst"\]=>
+17 -5
View File
@@ -1700,7 +1700,7 @@ PHP_FUNCTION(dom_document_save)
char *file;
long options = 0;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|l", &id, dom_document_class_entry, &file, &file_len, &options) == FAILURE) {
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Op|l", &id, dom_document_class_entry, &file, &file_len, &options) == FAILURE) {
return;
}
@@ -1930,7 +1930,7 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type
int is_valid;
char resolved_path[MAXPATHLEN + 1];
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Op|l", &id, dom_document_class_entry, &source, &source_len, &flags) == FAILURE) {
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|l", &id, dom_document_class_entry, &source, &source_len, &flags) == FAILURE) {
return;
}
@@ -1943,6 +1943,10 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type
switch (type) {
case DOM_LOAD_FILE:
if (CHECK_NULL_PATH(source, source_len)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid Schema file source");
RETURN_FALSE;
}
valid_file = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN TSRMLS_CC);
if (!valid_file) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid Schema file source");
@@ -2026,7 +2030,7 @@ static void _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int typ
int is_valid;
char resolved_path[MAXPATHLEN + 1];
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Op", &id, dom_document_class_entry, &source, &source_len) == FAILURE) {
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &source, &source_len) == FAILURE) {
return;
}
@@ -2039,6 +2043,10 @@ static void _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int typ
switch (type) {
case DOM_LOAD_FILE:
if (CHECK_NULL_PATH(source, source_len)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid RelaxNG file source");
RETURN_FALSE;
}
valid_file = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN TSRMLS_CC);
if (!valid_file) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid RelaxNG file source");
@@ -2119,7 +2127,7 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
id = getThis();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|l", &source, &source_len, &options) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &source, &source_len, &options) == FAILURE) {
return;
}
@@ -2129,6 +2137,10 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
}
if (mode == DOM_LOAD_FILE) {
if (CHECK_NULL_PATH(source, source_len)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid file source");
RETURN_FALSE;
}
ctxt = htmlCreateFileParserCtxt(source, NULL);
} else {
source_len = xmlStrlen(source);
@@ -2217,7 +2229,7 @@ PHP_FUNCTION(dom_document_save_html_file)
char *file;
const char *encoding;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &file, &file_len) == FAILURE) {
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Op", &id, dom_document_class_entry, &file, &file_len) == FAILURE) {
return;
}
@@ -15,9 +15,9 @@ $result = $doc->loadHTMLFile("");
assert('$result === false');
$doc = new DOMDocument();
$result = $doc->loadHTMLFile("text.html\0something");
assert('$result === null');
assert('$result === false');
?>
--EXPECTF--
%r(PHP ){0,1}%rWarning: DOMDocument::loadHTMLFile(): Empty string supplied as input %s
%r(PHP ){0,1}%rWarning: DOMDocument::loadHTMLFile() expects parameter 1 to be a valid path, string given %s
%r(PHP ){0,1}%rWarning: DOMDocument::loadHTMLFile(): Invalid file source %s
-2
View File
@@ -1663,8 +1663,6 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
for (ptr = data->buf; rcvd; rcvd--, ptr++) {
if (*ptr == '\n' && lastch == '\r') {
lines++;
} else {
size++;
}
lastch = *ptr;
}
+7 -7
View File
@@ -1750,7 +1750,7 @@ PHP_FUNCTION(imagefilledarc)
long cx, cy, w, h, ST, E, col, style;
gdImagePtr im;
int e, st;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllllllll", &IM, &cx, &cy, &w, &h, &ST, &E, &col, &style) == FAILURE) {
return;
}
@@ -1991,7 +1991,7 @@ PHP_FUNCTION(imagegrabwindow)
if ( handle == 0 ) {
goto clean;
}
pPrintWindow = (tPrintWindow) GetProcAddress(handle, "PrintWindow");
pPrintWindow = (tPrintWindow) GetProcAddress(handle, "PrintWindow");
if ( pPrintWindow ) {
pPrintWindow(window, memDC, (UINT) client_area);
@@ -3860,7 +3860,7 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int
if (zend_hash_get_current_data_ex(HASH_OF(EXT), (void **) &item, &pos) == FAILURE) {
continue;
}
if (strcmp("linespacing", key) == 0) {
convert_to_double_ex(item);
strex.flags |= gdFTEX_LINESPACE;
@@ -3939,7 +3939,7 @@ PHP_FUNCTION(imagepsloadfont)
struct stat st;
#endif
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &file, &file_len) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &file, &file_len) == FAILURE) {
return;
}
@@ -4279,11 +4279,11 @@ PHP_FUNCTION(imagepsbbox)
if (argc != 3 && argc != 6) {
ZEND_WRONG_PARAM_COUNT();
}
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "srl|lld", &str, &str_len, &fnt, &sz, &sp, &wd, &angle) == FAILURE) {
return;
}
if (argc == 6) {
space = sp;
add_width = wd;
@@ -4459,7 +4459,7 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type )
int x, y;
float x_ratio, y_ratio;
long ignore_warning;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "pplll", &f_org, &f_org_len, &f_dest, &f_dest_len, &height, &width, &threshold) == FAILURE) {
return;
}
+7 -7
View File
@@ -706,14 +706,14 @@ static WebPResult VPXEncode(const uint8* Y,
codec_ctl(&enc, VP8E_SET_STATIC_THRESHOLD, 0);
codec_ctl(&enc, VP8E_SET_TOKEN_PARTITIONS, 2);
vpx_img_wrap(&img, IMG_FMT_I420,
vpx_img_wrap(&img, VPX_IMG_FMT_I420,
y_width, y_height, 16, (uint8*)(Y));
img.planes[PLANE_Y] = (uint8*)(Y);
img.planes[PLANE_U] = (uint8*)(U);
img.planes[PLANE_V] = (uint8*)(V);
img.stride[PLANE_Y] = y_stride;
img.stride[PLANE_U] = uv_stride;
img.stride[PLANE_V] = uv_stride;
img.planes[VPX_PLANE_Y] = (uint8*)(Y);
img.planes[VPX_PLANE_U] = (uint8*)(U);
img.planes[VPX_PLANE_V] = (uint8*)(V);
img.stride[VPX_PLANE_Y] = y_stride;
img.stride[VPX_PLANE_U] = uv_stride;
img.stride[VPX_PLANE_V] = uv_stride;
res = vpx_codec_encode(&enc, &img, 0, 1, 0, VPX_DL_BEST_QUALITY);
+35 -4
View File
@@ -35,7 +35,7 @@ if test "$PHP_ICONV" != "no"; then
PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h"
else
PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/iconv.h"
fi
fi
AC_MSG_CHECKING([if iconv is glibc's])
AC_TRY_LINK([#include <gnu/libc-version.h>],[gnu_get_libc_version();],
@@ -53,8 +53,8 @@ if test "$PHP_ICONV" != "no"; then
AC_TRY_RUN([
#include <$PHP_ICONV_H_PATH>
int main() {
printf("%d", _libiconv_version);
return 0;
printf("%d", _libiconv_version);
return 0;
}
],[
AC_MSG_RESULT(yes)
@@ -138,7 +138,7 @@ int main() {
if (cd == (iconv_t)(-1)) {
if (errno == EINVAL) {
return 0;
} else {
} else {
return 1;
}
}
@@ -159,6 +159,37 @@ int main() {
AC_DEFINE([ICONV_SUPPORTS_ERRNO],0,[Whether iconv supports error no or not])
])
AC_MSG_CHECKING([if iconv supports //IGNORE])
AC_TRY_RUN([
#include <$PHP_ICONV_H_PATH>
#include <stdlib.h>
int main() {
iconv_t cd = iconv_open( "UTF-8//IGNORE", "UTF-8" );
char *in_p = "\xC3\xC3\xC3\xB8";
size_t in_left = 4, out_left = 4096;
char *out = malloc(out_left);
char *out_p = out;
size_t result = iconv(cd, (char **) &in_p, &in_left, (char **) &out_p, &out_left);
if(result == (size_t)-1) {
return 1;
}
return 0;
}
],[
AC_MSG_RESULT(yes)
PHP_DEFINE([ICONV_BROKEN_IGNORE],0,[ext/iconv])
AC_DEFINE([ICONV_BROKEN_IGNORE],0,[Whether iconv supports IGNORE])
],[
AC_MSG_RESULT(no)
PHP_DEFINE([ICONV_BROKEN_IGNORE],1,[ext/iconv])
AC_DEFINE([ICONV_BROKEN_IGNORE],1,[Whether iconv supports IGNORE])
],[
AC_MSG_RESULT(no, cross-compiling)
PHP_DEFINE([ICONV_SUPPORTS_ERRNO],0,[ext/iconv])
AC_DEFINE([ICONV_SUPPORTS_ERRNO],0,[Whether iconv supports IGNORE])
])
AC_MSG_CHECKING([if your cpp allows macro usage in include lines])
AC_TRY_COMPILE([
#define FOO <$PHP_ICONV_H_PATH>
+30
View File
@@ -529,6 +529,24 @@ static php_iconv_err_t _php_iconv_appendc(smart_str *d, const char c, iconv_t cd
}
/* }}} */
/* {{{ */
#if ICONV_BROKEN_IGNORE
static int _php_check_ignore(const char *charset)
{
size_t clen = strlen(charset);
if (clen >= 9 && strcmp("//IGNORE", charset+clen-8) == 0) {
return 1;
}
if (clen >= 19 && strcmp("//IGNORE//TRANSLIT", charset+clen-18) == 0) {
return 1;
}
return 0;
}
#else
#define _php_check_ignore(x) (0)
#endif
/* }}} */
/* {{{ php_iconv_string()
*/
PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
@@ -610,6 +628,7 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
char *out_p, *out_buf, *tmp_buf;
size_t bsz, result = 0;
php_iconv_err_t retval = PHP_ICONV_ERR_SUCCESS;
int ignore_ilseq = _php_check_ignore(out_charset);
*out = NULL;
*out_len = 0;
@@ -634,6 +653,17 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
result = iconv(cd, (char **) &in_p, &in_left, (char **) &out_p, &out_left);
out_size = bsz - out_left;
if (result == (size_t)(-1)) {
if (ignore_ilseq && errno == EILSEQ) {
if (in_left <= 1) {
result = 0;
} else {
errno = 0;
in_p++;
in_left--;
continue;
}
}
if (errno == E2BIG && in_left > 0) {
/* converted string is longer than out buffer */
bsz += in_len;
+27
View File
@@ -0,0 +1,27 @@
--TEST--
Bug #48147 (iconv with //IGNORE cuts the string)
--SKIPIF--
<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?>
--FILE--
<?php
$text = "aa\xC3\xC3\xC3\xB8aa";
var_dump(iconv("UTF-8", "UTF-8", $text));
var_dump(urlencode(iconv("UTF-8", "UTF-8//IGNORE", $text)));
// only invalid
var_dump(urlencode(iconv("UTF-8", "UTF-8//IGNORE", "\xC3")));
// start invalid
var_dump(urlencode(iconv("UTF-8", "UTF-8//IGNORE", "\xC3\xC3\xC3\xB8aa")));
// finish invalid
var_dump(urlencode(iconv("UTF-8", "UTF-8//IGNORE", "aa\xC3\xC3\xC3")));
?>
--EXPECTF--
Notice: iconv(): Detected an illegal character in input string in %s on line %d
bool(false)
string(10) "aa%C3%B8aa"
Notice: iconv(): Detected an incomplete multibyte character in input string in %s on line %d
string(0) ""
string(8) "%C3%B8aa"
Notice: iconv(): Detected an incomplete multibyte character in input string in %s on line %d
string(0) ""
+23 -9
View File
@@ -380,7 +380,7 @@ static void php_mcrypt_module_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{
}
}
/* }}} */
static PHP_MINIT_FUNCTION(mcrypt) /* {{{ */
{
le_mcrypt = zend_register_list_destructors_ex(php_mcrypt_module_dtor, NULL, "mcrypt", module_number);
@@ -438,6 +438,9 @@ static PHP_MINIT_FUNCTION(mcrypt) /* {{{ */
php_stream_filter_register_factory("mcrypt.*", &php_mcrypt_filter_factory TSRMLS_CC);
php_stream_filter_register_factory("mdecrypt.*", &php_mcrypt_filter_factory TSRMLS_CC);
MCG(fd[RANDOM]) = -1;
MCG(fd[URANDOM]) = -1;
return SUCCESS;
}
/* }}} */
@@ -447,6 +450,14 @@ static PHP_MSHUTDOWN_FUNCTION(mcrypt) /* {{{ */
php_stream_filter_unregister_factory("mcrypt.*" TSRMLS_CC);
php_stream_filter_unregister_factory("mdecrypt.*" TSRMLS_CC);
if (MCG(fd[RANDOM]) > 0) {
close(MCG(fd[RANDOM]));
}
if (MCG(fd[URANDOM]) > 0) {
close(MCG(fd[URANDOM]));
}
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
@@ -1423,24 +1434,27 @@ PHP_FUNCTION(mcrypt_create_iv)
}
n = size;
#else
int fd;
int *fd = &MCG(fd[source]);
size_t read_bytes = 0;
fd = open(source == RANDOM ? "/dev/random" : "/dev/urandom", O_RDONLY);
if (fd < 0) {
efree(iv);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot open source device");
RETURN_FALSE;
if (*fd < 0) {
*fd = open(source == RANDOM ? "/dev/random" : "/dev/urandom", O_RDONLY);
if (*fd < 0) {
efree(iv);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot open source device");
RETURN_FALSE;
}
}
while (read_bytes < size) {
n = read(fd, iv + read_bytes, size - read_bytes);
n = read(*fd, iv + read_bytes, size - read_bytes);
if (n < 0) {
break;
}
read_bytes += n;
}
n = read_bytes;
close(fd);
if (n < size) {
efree(iv);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not gather sufficient random data");
+1
View File
@@ -77,6 +77,7 @@ ZEND_BEGIN_MODULE_GLOBALS(mcrypt)
int le_h;
char *modes_dir;
char *algorithms_dir;
int fd[2]; // RANDOM = 0, URANDOM = 1
ZEND_END_MODULE_GLOBALS(mcrypt)
#ifdef ZTS
+9 -7
View File
@@ -1759,13 +1759,15 @@ next_target_ex:
}
} else if (block->op2_to == block->ext_to) {
/* both goto the same one - it's JMP */
/* JMPZNZ(?,L,L) -> JMP(L) */
last_op->opcode = ZEND_JMP;
SET_UNUSED(last_op->op1);
SET_UNUSED(last_op->op2);
block->op1_to = block->op2_to;
block->op2_to = NULL;
block->ext_to = NULL;
if (!(last_op->op1_type & (IS_VAR|IS_TMP_VAR))) {
/* JMPZNZ(?,L,L) -> JMP(L) */
last_op->opcode = ZEND_JMP;
SET_UNUSED(last_op->op1);
SET_UNUSED(last_op->op2);
block->op1_to = block->op2_to;
block->op2_to = NULL;
block->ext_to = NULL;
}
} else if (block->op2_to == next) {
/* jumping to next on Z - can follow to it and jump only on NZ */
/* JMPZNZ(X,L1,L2) L1: -> JMPNZ(X,L2) */
+1 -1
View File
@@ -27,7 +27,7 @@
#endif
#define ACCELERATOR_PRODUCT_NAME "Zend OPcache"
#define PHP_ZENDOPCACHE_VERSION "7.0.4-dev"
#define PHP_ZENDOPCACHE_VERSION "7.0.6-dev"
#define ACCELERATOR_VERSION PHP_ZENDOPCACHE_VERSION
/* 2 - added Profiler support, on 20010712 */
/* 3 - added support for Optimizer's encoded-only-files mode */
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug #69549 (Memory leak with opcache.optimization_level=0xFFFFFFFF)
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$a = array(true);
if($a[0] && false) {
echo 'test';
}
echo "ok\n";
?>
--EXPECT--
ok
@@ -35,11 +35,6 @@ $clientCode = <<<'CODE'
phpt_wait();
stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_SSLv3_CLIENT);
stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx);
$meta = stream_context_get_options($clientCtx)['ssl']['session_meta'];
var_dump($meta['protocol']);
stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT);
stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx);
$meta = stream_context_get_options($clientCtx)['ssl']['session_meta'];
@@ -59,7 +54,6 @@ CODE;
include 'ServerClientTestCase.inc';
ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
--EXPECTF--
string(5) "SSLv3"
string(5) "TLSv1"
string(7) "TLSv1.1"
string(7) "TLSv1.2"
@@ -32,9 +32,6 @@ $clientCode = <<<'CODE'
phpt_wait();
stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_SSLv3_CLIENT);
var_dump(stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT);
var_dump(stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
@@ -47,4 +44,3 @@ ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
--EXPECTF--
resource(%d) of type (stream)
resource(%d) of type (stream)
resource(%d) of type (stream)
@@ -13,7 +13,7 @@ $serverCode = <<<'CODE'
$serverCtx = stream_context_create(['ssl' => [
'local_cert' => __DIR__ . '/bug54992.pem',
// Only accept SSLv3 and TLSv1.2 connections
// Only accept TLSv1.2 connections
'crypto_method' => STREAM_CRYPTO_METHOD_SSLv3_SERVER | STREAM_CRYPTO_METHOD_TLSv1_2_SERVER,
]]);
@@ -40,9 +40,6 @@ $clientCode = <<<'CODE'
stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT);
var_dump(stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_SSLv3_CLIENT);
var_dump(stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT);
var_dump(@stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
@@ -54,7 +51,6 @@ include 'ServerClientTestCase.inc';
ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
--EXPECTF--
resource(%d) of type (stream)
resource(%d) of type (stream)
bool(false)
bool(false)
+2 -1
View File
@@ -4,6 +4,7 @@ Specific crypto method for ssl:// transports.
<?php
if (!extension_loaded("openssl")) die("skip openssl not loaded");
if (!function_exists("proc_open")) die("skip no proc_open");
if (OPENSSL_VERSION_NUMBER < 0x10001001) die("skip OpenSSLv1.0.1 required");
--FILE--
<?php
$serverCode = <<<'CODE'
@@ -37,7 +38,7 @@ $clientCode = <<<'CODE'
$serverUri = "https://127.0.0.1:64321/";
$clientFlags = STREAM_CLIENT_CONNECT;
$clientCtx = stream_context_create(['ssl' => [
'crypto_method' => STREAM_CRYPTO_METHOD_SSLv3_CLIENT,
'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT,
'verify_peer' => false,
'verify_peer_name' => false
]]);
+3 -3
View File
@@ -314,7 +314,7 @@ them both to 0; an emulation function will be used. */
#define PACKAGE_NAME "PCRE"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "PCRE 8.36"
#define PACKAGE_STRING "PCRE 8.37"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "pcre"
@@ -323,7 +323,7 @@ them both to 0; an emulation function will be used. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "8.36"
#define PACKAGE_VERSION "8.37"
/* to make a symbol visible */
/* #undef PCRECPP_EXP_DECL */
@@ -439,7 +439,7 @@ them both to 0; an emulation function will be used. */
/* Version number of package */
#ifndef VERSION
#define VERSION "8.36"
#define VERSION "8.37"
#endif
/* Define to empty if `const' does not conform to ANSI C. */
+7 -2
View File
@@ -5479,7 +5479,11 @@ PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, z
src = estrdup(table_name);
tmp_name = php_strtok_r(src, ".", &tmp_name2);
if (!tmp_name) {
efree(src);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The table name must be specified");
return FAILURE;
}
if (!tmp_name2 || !*tmp_name2) {
/* Default schema */
tmp_name2 = tmp_name;
@@ -6496,7 +6500,8 @@ static int do_exec(smart_str *querystr, int expect, PGconn *pg_link, ulong opt T
static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const char *table)
{
char *table_copy, *escaped, *token, *tmp;
char *table_copy, *escaped, *tmp;
const char *token;
size_t len;
/* schame.table should be "schame"."table" */
+27
View File
@@ -0,0 +1,27 @@
--TEST--
PostgreSQL pg_insert() - test for CVE-2015-1532
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
<?php
include('config.inc');
$conn = pg_connect($conn_str);
foreach (array('', '.', '..') as $table) {
var_dump(pg_insert($conn, $table, array('id' => 1, 'id2' => 1)));
}
?>
Done
--EXPECTF--
Warning: pg_insert(): The table name must be specified in %s on line %d
bool(false)
Warning: pg_insert(): The table name must be specified in %s on line %d
bool(false)
Warning: pg_insert(): The table name must be specified in %s on line %d
bool(false)
Done
+1 -1
View File
@@ -39,7 +39,7 @@ install-pharcmd: pharcmd
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
$(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir)
-@rm -f $(INSTALL_ROOT)$(bindir)/phar
$(LN_S) -f $(INSTALL_ROOT)$(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar
$(LN_S) -f phar.phar $(INSTALL_ROOT)$(bindir)/phar
@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1
@$(INSTALL_DATA) $(builddir)/phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.1
@$(INSTALL_DATA) $(builddir)/phar.phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.phar.1
+1 -1
View File
@@ -14,7 +14,7 @@ $r = new Phar($fname, 0);
==DONE==
--EXPECTF--
exception 'UnexpectedValueException' with message 'phar error: corrupted central directory entry, no magic signature in zip-based phar "%s%ebug69441.phar"' in %s%ebug69441.php:%d
exception 'UnexpectedValueException' with message 'phar error: corrupted central directory entry, no magic signature in zip-based phar "%sbug69441.phar"' in %sbug69441.php:%d
Stack trace:
#0 %s%ebug69441.php(%d): Phar->__construct('%s', 0)
#1 {main}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -4120,7 +4120,7 @@ PHP_FUNCTION(putenv)
Obviously the CRT version will be useful more often. But
generally, doing both brings us on the safe track at least
in NTS build. */
&& _putenv(pe.putenv_string) == 0
&& _putenv_s(pe.key, value ? value : "") == 0
# endif
) { /* success */
# endif
+8
View File
@@ -380,6 +380,14 @@ PHPAPI char *php_escape_shell_arg(char *str)
}
}
#ifdef PHP_WIN32
if (y > 0 && '\\' == cmd[y - 1]) {
int k = 0, n = y - 1;
for (; n >= 0 && '\\' == cmd[n]; n--, k++);
if (k % 2) {
cmd[y++] = '\\';
}
}
cmd[y++] = '"';
#else
cmd[y++] = '\'';
+44
View File
@@ -223,6 +223,44 @@ void php_mail_log_to_file(char *filename, char *message, size_t message_size TSR
}
static int php_mail_detect_multiple_crlf(char *hdr) {
/* This function detects multiple/malformed multiple newlines. */
size_t len;
if (!hdr) {
return 0;
}
/* Should not have any newlines at the beginning. */
/* RFC 2822 2.2. Header Fields */
if (*hdr < 33 || *hdr > 126 || *hdr == ':') {
return 1;
}
while(*hdr) {
if (*hdr == '\r') {
if (*(hdr+1) == '\0' || *(hdr+1) == '\r' || (*(hdr+1) == '\n' && (*(hdr+2) == '\0' || *(hdr+2) == '\n' || *(hdr+2) == '\r'))) {
/* Malformed or multiple newlines. */
return 1;
} else {
hdr += 2;
}
} else if (*hdr == '\n') {
if (*(hdr+1) == '\0' || *(hdr+1) == '\r' || *(hdr+1) == '\n') {
/* Malformed or multiple newlines. */
return 1;
} else {
hdr += 2;
}
} else {
hdr++;
}
}
return 0;
}
/* {{{ php_mail
*/
PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char *extra_cmd TSRMLS_DC)
@@ -276,6 +314,7 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char
efree(tmp);
}
if (PG(mail_x_header)) {
const char *tmp = zend_get_executed_filename(TSRMLS_C);
char *f;
@@ -291,6 +330,11 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char
efree(f);
}
if (hdr && php_mail_detect_multiple_crlf(hdr)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Multiple or malformed newlines found in additional_header");
MAIL_RET(0);
}
if (!sendmail_path) {
#if (defined PHP_WIN32 || defined NETWARE)
/* handle old style win smtp sending */
+49
View File
@@ -0,0 +1,49 @@
--TEST--
Bug #69628: GLOB_BRACE with multiple brackets within the braces fails
--SKIPIF--
<?php
if (!defined('GLOB_BRACE')) {
die('skip this test requires GLOB_BRACE support');
}
?>
--FILE--
<?php
$file_path = dirname(__FILE__);
// temp dirname used here
$dirname = "$file_path/bug69628";
// temp dir created
mkdir($dirname);
// temp files created
file_put_contents("$dirname/image.jPg", '');
file_put_contents("$dirname/image.gIf", '');
file_put_contents("$dirname/image.png", '');
sort_var_dump(glob("$dirname/*.{[jJ][pP][gG],[gG][iI][fF]}", GLOB_BRACE));
function sort_var_dump($results) {
sort($results);
var_dump($results);
}
?>
--CLEAN--
<?php
$file_path = dirname(__FILE__);
unlink("$file_path/bug69628/image.jPg");
unlink("$file_path/bug69628/image.gIf");
unlink("$file_path/bug69628/image.png");
rmdir("$file_path/bug69628/");
?>
--EXPECTF--
array(2) {
[0]=>
string(%d) "%s/bug69628/image.gIf"
[1]=>
string(%d) "%s/bug69628/image.jPg"
}
@@ -5,6 +5,9 @@ Test glob() function: usage variations
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. Not valid for Windows');
}
if (!defined('GLOB_BRACE')) {
die('skip this test requires GLOB_BRACE support');
}
?>
--FILE--
<?php
+329
View File
@@ -0,0 +1,329 @@
--TEST--
Test mail() function : basic functionality
--INI--
sendmail_path=tee mailBasic.out >/dev/null
mail.add_x_header = Off
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) == "WIN")
die("skip Won't run on Windows");
?>
--FILE--
<?php
/* Prototype : int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])
* Description: Send an email message with invalid addtional_headers
* Source code: ext/standard/mail.c
* Alias to functions:
*/
echo "*** Testing mail() : basic functionality ***\n";
// Valid header
$to = 'user@example.com';
$subject = 'Test Subject';
$message = 'A Message';
$additional_headers = "HEAD1: a\r\nHEAD2: b\r\n";
$outFile = "mailBasic.out";
@unlink($outFile);
echo "-- Valid Header --\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo file_get_contents($outFile);
unlink($outFile);
// Valid header
$additional_headers = "HEAD1: a\nHEAD2: b\n";
@unlink($outFile);
echo "-- Valid Header --\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Valid header
// \r is accepted as valid. This may be changed to invalid.
$additional_headers = "HEAD1: a\rHEAD2: b\r";
@unlink($outFile);
echo "-- Valid Header --\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
//===============================================================================
// Invalid header
$additional_headers = "\nHEAD1: a\nHEAD2: b\n";
@unlink($outFile);
echo "-- Invalid Header - preceeding newline--\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Invalid header
$additional_headers = "\rHEAD1: a\nHEAD2: b\r";
@unlink($outFile);
echo "-- Invalid Header - preceeding newline--\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Invalid header
$additional_headers = "\r\nHEAD1: a\r\nHEAD2: b\r\n";
@unlink($outFile);
echo "-- Invalid Header - preceeding newline--\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Invalid header
$additional_headers = "\r\n\r\nHEAD1: a\r\nHEAD2: b\r\n";
@unlink($outFile);
echo "-- Invalid Header - preceeding newline--\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Invalid header
$additional_headers = "\n\nHEAD1: a\r\nHEAD2: b\r\n";
@unlink($outFile);
echo "-- Invalid Header - preceeding newline--\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Invalid header
$additional_headers = "\r\rHEAD1: a\r\nHEAD2: b\r\n";
@unlink($outFile);
echo "-- Invalid Header - preceeding newline--\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Invalid header
$additional_headers = "HEAD1: a\r\n\r\nHEAD2: b\r\n";
@unlink($outFile);
echo "-- Invalid Header - multiple newlines in the middle --\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Invalid header
$additional_headers = "HEAD1: a\r\n\nHEAD2: b\r\n";
@unlink($outFile);
echo "-- Invalid Header - multiple newlines in the middle --\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Invalid header
$additional_headers = "HEAD1: a\n\nHEAD2: b\r\n";
@unlink($outFile);
echo "-- Invalid Header - multiple newlines in the middle --\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Invalid header
$additional_headers = "HEAD1: a\r\rHEAD2: b\r\n";
@unlink($outFile);
echo "-- Invalid Header - multiple newlines in the middle --\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Invalid header
$additional_headers = "HEAD1: a\n\rHEAD2: b\r\n";
@unlink($outFile);
echo "-- Invalid Header - multiple newlines in the middle --\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Invalid header
$additional_headers = "HEAD1: a\n\r\nHEAD2: b\r\n";
@unlink($outFile);
echo "-- Invalid Header - multiple newlines in the middle --\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Invalid header
// Invalid, but PHP_FUNCTION(mail) trims newlines
$additional_headers = "HEAD1: a\r\nHEAD2: b\r\n\n";
@unlink($outFile);
echo "-- Invalid Header - trailing newlines --\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Invalid header
// Invalid, but PHP_FUNCTION(mail) trims newlines
$additional_headers = "HEAD1: a\r\nHEAD2: b\n\n";
@unlink($outFile);
echo "-- Invalid Header - trailing newlines --\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Invalid header
// Invalid, but PHP_FUNCTION(mail) trims newlines
$additional_headers = "HEAD1: a\r\nHEAD2: b\n";
@unlink($outFile);
echo "-- Invalid Header - trailing newlines --\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
// Invalid header
// Invalid, but PHP_FUNCTION(mail) trims newlines
$additional_headers = "HEAD1: a\r\nHEAD2: b\r";
@unlink($outFile);
echo "-- Invalid Header - trailing newlines --\n";
// Calling mail() with all additional headers
var_dump( mail($to, $subject, $message, $additional_headers) );
echo @file_get_contents($outFile);
@unlink($outFile);
?>
===DONE===
--EXPECTF--
*** Testing mail() : basic functionality ***
-- Valid Header --
bool(true)
To: user@example.com
Subject: Test Subject
HEAD1: a
HEAD2: b
A Message
-- Valid Header --
bool(true)
To: user@example.com
Subject: Test Subject
HEAD1: a
HEAD2: b
A Message
-- Valid Header --
bool(true)
To: user@example.com
Subject: Test Subject
HEAD1: a HEAD2: b
A Message
-- Invalid Header - preceeding newline--
Warning: mail(): Multiple or malformed newlines found in additional_header in %s/mail_basic6.php on line %d
bool(false)
-- Invalid Header - preceeding newline--
Warning: mail(): Multiple or malformed newlines found in additional_header in %s/mail_basic6.php on line %d
bool(false)
-- Invalid Header - preceeding newline--
Warning: mail(): Multiple or malformed newlines found in additional_header in %s/mail_basic6.php on line %d
bool(false)
-- Invalid Header - preceeding newline--
Warning: mail(): Multiple or malformed newlines found in additional_header in %s/mail_basic6.php on line %d
bool(false)
-- Invalid Header - preceeding newline--
Warning: mail(): Multiple or malformed newlines found in additional_header in %s/mail_basic6.php on line %d
bool(false)
-- Invalid Header - preceeding newline--
Warning: mail(): Multiple or malformed newlines found in additional_header in %s/mail_basic6.php on line %d
bool(false)
-- Invalid Header - multiple newlines in the middle --
Warning: mail(): Multiple or malformed newlines found in additional_header in %s/mail_basic6.php on line %d
bool(false)
-- Invalid Header - multiple newlines in the middle --
Warning: mail(): Multiple or malformed newlines found in additional_header in %s/mail_basic6.php on line %d
bool(false)
-- Invalid Header - multiple newlines in the middle --
Warning: mail(): Multiple or malformed newlines found in additional_header in %s/mail_basic6.php on line %d
bool(false)
-- Invalid Header - multiple newlines in the middle --
Warning: mail(): Multiple or malformed newlines found in additional_header in %s/mail_basic6.php on line %d
bool(false)
-- Invalid Header - multiple newlines in the middle --
Warning: mail(): Multiple or malformed newlines found in additional_header in %s/mail_basic6.php on line %d
bool(false)
-- Invalid Header - multiple newlines in the middle --
Warning: mail(): Multiple or malformed newlines found in additional_header in %s/mail_basic6.php on line %d
bool(false)
-- Invalid Header - trailing newlines --
bool(true)
To: user@example.com
Subject: Test Subject
HEAD1: a
HEAD2: b
A Message
-- Invalid Header - trailing newlines --
bool(true)
To: user@example.com
Subject: Test Subject
HEAD1: a
HEAD2: b
A Message
-- Invalid Header - trailing newlines --
bool(true)
To: user@example.com
Subject: Test Subject
HEAD1: a
HEAD2: b
A Message
-- Invalid Header - trailing newlines --
bool(true)
To: user@example.com
Subject: Test Subject
HEAD1: a
HEAD2: b
A Message
===DONE===
+2 -2
View File
@@ -1868,7 +1868,7 @@ void php_request_shutdown(void *dummy)
}
} zend_end_try();
/* 7.5 free last error information */
/* 7.5 free last error information and temp dir */
if (PG(last_error_message)) {
free(PG(last_error_message));
PG(last_error_message) = NULL;
@@ -1877,6 +1877,7 @@ void php_request_shutdown(void *dummy)
free(PG(last_error_file));
PG(last_error_file) = NULL;
}
php_shutdown_temporary_directory();
/* 7. Shutdown scanner/executor/compiler and restore ini entries */
zend_deactivate(TSRMLS_C);
@@ -2475,7 +2476,6 @@ void php_module_shutdown(TSRMLS_D)
#endif
php_output_shutdown();
php_shutdown_temporary_directory();
module_initialized = 0;
+9 -9
View File
@@ -181,7 +181,7 @@ static char* temporary_directory;
PHPAPI void php_shutdown_temporary_directory(void)
{
if (temporary_directory) {
free(temporary_directory);
efree(temporary_directory);
temporary_directory = NULL;
}
}
@@ -202,10 +202,10 @@ PHPAPI const char* php_get_temporary_directory(TSRMLS_D)
if (sys_temp_dir) {
int len = strlen(sys_temp_dir);
if (len >= 2 && sys_temp_dir[len - 1] == DEFAULT_SLASH) {
temporary_directory = zend_strndup(sys_temp_dir, len - 1);
temporary_directory = estrndup(sys_temp_dir, len - 1);
return temporary_directory;
} else if (len >= 1 && sys_temp_dir[len - 1] != DEFAULT_SLASH) {
temporary_directory = zend_strndup(sys_temp_dir, len);
temporary_directory = estrndup(sys_temp_dir, len);
return temporary_directory;
}
}
@@ -222,9 +222,9 @@ PHPAPI const char* php_get_temporary_directory(TSRMLS_D)
DWORD len = GetTempPath(sizeof(sTemp),sTemp);
assert(0 < len); /* should *never* fail! */
if (sTemp[len - 1] == DEFAULT_SLASH) {
temporary_directory = zend_strndup(sTemp, len - 1);
temporary_directory = estrndup(sTemp, len - 1);
} else {
temporary_directory = zend_strndup(sTemp, len);
temporary_directory = estrndup(sTemp, len);
}
return temporary_directory;
}
@@ -236,9 +236,9 @@ PHPAPI const char* php_get_temporary_directory(TSRMLS_D)
int len = strlen(s);
if (s[len - 1] == DEFAULT_SLASH) {
temporary_directory = zend_strndup(s, len - 1);
temporary_directory = estrndup(s, len - 1);
} else {
temporary_directory = zend_strndup(s, len);
temporary_directory = estrndup(s, len);
}
return temporary_directory;
@@ -247,12 +247,12 @@ PHPAPI const char* php_get_temporary_directory(TSRMLS_D)
#ifdef P_tmpdir
/* Use the standard default temporary directory. */
if (P_tmpdir) {
temporary_directory = strdup(P_tmpdir);
temporary_directory = estrdup(P_tmpdir);
return temporary_directory;
}
#endif
/* Shouldn't ever(!) end up here ... last ditch default. */
temporary_directory = strdup("/tmp");
temporary_directory = estrndup("/tmp", sizeof("/tmp"));
return temporary_directory;
#endif
}
+9 -3
View File
@@ -310,6 +310,11 @@ static inline int add_post_vars(zval *arr, post_var_data_t *vars, zend_bool eof
return SUCCESS;
}
#ifdef PHP_WIN32
#define SAPI_POST_HANDLER_BUFSIZ 16384
#else
# define SAPI_POST_HANDLER_BUFSIZ BUFSIZ
#endif
SAPI_API SAPI_POST_HANDLER_FUNC(php_std_post_handler)
{
zval *arr = (zval *) arg;
@@ -320,8 +325,8 @@ SAPI_API SAPI_POST_HANDLER_FUNC(php_std_post_handler)
memset(&post_data, 0, sizeof(post_data));
while (!php_stream_eof(s)) {
char buf[BUFSIZ] = {0};
size_t len = php_stream_read(s, buf, BUFSIZ);
char buf[SAPI_POST_HANDLER_BUFSIZ] = {0};
size_t len = php_stream_read(s, buf, SAPI_POST_HANDLER_BUFSIZ);
if (len && len != (size_t) -1) {
smart_str_appendl(&post_data.str, buf, len);
@@ -334,7 +339,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(php_std_post_handler)
}
}
if (len != BUFSIZ){
if (len != SAPI_POST_HANDLER_BUFSIZ){
break;
}
}
@@ -345,6 +350,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(php_std_post_handler)
}
}
}
#undef SAPI_POST_HANDLER_BUFSIZ
SAPI_API SAPI_INPUT_FILTER_FUNC(php_default_input_filter)
{
+3 -3
View File
@@ -2,7 +2,7 @@
/* edit configure.in to change version number */
#define PHP_MAJOR_VERSION 5
#define PHP_MINOR_VERSION 6
#define PHP_RELEASE_VERSION 9
#define PHP_RELEASE_VERSION 10
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "5.6.9"
#define PHP_VERSION_ID 50609
#define PHP_VERSION "5.6.10"
#define PHP_VERSION_ID 50610
+1 -1
View File
@@ -1889,11 +1889,11 @@ consult the installation file that came with this distribution, or visit \n\
zend_first_try {
while (fcgi_accept_request(&request) >= 0) {
char *primary_script = NULL;
request_body_fd = -1;
SG(server_context) = (void *) &request;
init_request_info(TSRMLS_C);
CG(interactive) = 0;
char *primary_script = NULL;
fpm_request_info();
+14 -4
View File
@@ -3131,10 +3131,20 @@ static int lsapi_initSuEXEC()
if ( !s_defaultUid || !s_defaultGid )
{
pw = getpwnam( "nobody" );
if ( !s_defaultUid )
s_defaultUid = pw->pw_uid;
if ( !s_defaultGid )
s_defaultGid = pw->pw_gid;
if ( pw )
{
if ( !s_defaultUid )
s_defaultUid = pw->pw_uid;
if ( !s_defaultGid )
s_defaultGid = pw->pw_gid;
}
else
{
if ( !s_defaultUid )
s_defaultUid = 10000;
if ( !s_defaultGid )
s_defaultGid = 10000;
}
}
return 0;
}
+8
View File
@@ -1937,6 +1937,14 @@ function generate_phpize()
CJ.WriteLine("var PHP_ZTS =" + '"' + PHP_ZTS + '"');
CJ.WriteLine("var PHP_DLL_LIB =" + '"' + get_define('PHPLIB') + '"');
CJ.WriteLine("var PHP_DLL =" + '"' + get_define('PHPDLL') + '"');
/* The corresponding configure options aren't enabled through phpize,
thus these dummy declarations are required. */
CJ.WriteLine("var PHP_ANALYZER =" + '"no"');
CJ.WriteLine("var PHP_PGO =" + '"no"');
CJ.WriteLine("var PHP_PGI =" + '"no"');
CJ.WriteLine("var PHP_ALL_SHARED =" + '"no"');
CJ.WriteBlankLines(1);
CJ.Close();
}
+4 -2
View File
@@ -293,17 +293,19 @@ globexp2(ptr, pattern, pglob, rv)
}
for (i = 0, pl = pm = ptr; pm <= pe; pm++) {
const Char *pb;
switch (*pm) {
case LBRACKET:
/* Ignore everything between [] */
for (pl = pm++; *pm != RBRACKET && *pm != EOS; pm++)
for (pb = pm++; *pm != RBRACKET && *pm != EOS; pm++)
;
if (*pm == EOS) {
/*
* We could not find a matching RBRACKET.
* Ignore and just look for RBRACE
*/
pm = pl;
pm = pb;
}
break;