Skip to content

Commit 4acc56d

Browse files
committed
Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: fix unserializer patch move this entry to the correct version add missing NEWS entry add missing NEWS entry Updated or skipped certain 32-bit tests add NEWS entry for #68594 5.4.37 add more BC breaks update news add CVE add missing test file Fix bug #68594 - Use after free vulnerability in unserialize() Fix typo Hash value must not zero?
2 parents 2eef2ab + cf84bf5 commit 4acc56d

24 files changed

+109
-71
lines changed

UPGRADING

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ PHP X.Y UPGRADE NOTES
4242
It will now produce 2, not 1.
4343
. Function parameters with duplicate name are not allowed anymore. Definitions
4444
like “function foo($x,$x) {}” will lead to compile time error.
45+
. Indirect variable, property and method references are now interpreted with
46+
left-to-right semantics. See details in:
47+
https://wiki.php.net/rfc/uniform_variable_syntax#semantic_differences_in_existing_syntax
48+
. The global keyword now only accepts simple variables. See details in:
49+
https://wiki.php.net/rfc/uniform_variable_syntax#global_keyword_takes_only_simple_variables
4550

4651
- DBA
4752
. dba_delete() now returns false if the key was not found for the inifile

Zend/tests/bug43128.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ eval("class $a {}");
1515
if ($a instanceof $a); // Segmentation fault
1616
new $a; // Segmentation fault
1717
echo "ok\n";
18+
?>
1819
--EXPECT--
1920
ok

Zend/zend_string.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,8 @@ static zend_always_inline zend_ulong zend_inline_hash_func(const char *str, size
279279
case 0: break;
280280
EMPTY_SWITCH_DEFAULT_CASE()
281281
}
282+
283+
ZEND_ASSERT(hash != 0);
282284
return hash;
283285
}
284286

ext/bcmath/tests/bug60377.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
--TEST--
22
bcscale related problem on 64bits platforms
33
--SKIPIF--
4-
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
4+
<?php if(!extension_loaded("bcmath")) die("skip");
5+
if (PHP_INT_SIZE != 8) die("skip: 64-bit only"); ?>
56
--FILE--
67
<?php
78
$var48 = bcscale(634314234334311);

ext/curl/tests/curl_version_variation1.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
--TEST--
22
Test curl_version() function : usage variations - test values for $ascii argument
33
--SKIPIF--
4-
<?php if (!extension_loaded("curl")) exit("skip curl extension not loaded"); ?>
4+
<?php if (!extension_loaded("curl")) exit("skip curl extension not loaded");
5+
if (PHP_INT_SIZE != 8) die('skip 64-bit only'); ?>
56
--FILE--
67
<?php
78

ext/exif/tests/exif_tagname_variation1.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
--TEST--
22
Test exif_tagname() function : usage variations - different types for index argument
33
--SKIPIF--
4-
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
4+
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';
5+
if (PHP_INT_SIZE != 8) die('skip 64-bit only');
6+
?>
57
--FILE--
68
<?php
79

ext/gd/tests/imagecolorallocate_variation2.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ if(!extension_loaded('gd')) {
88
if(!function_exists('imagecreatetruecolor')) {
99
die('skip imagecreatetruecolor function is not available');
1010
}
11+
if (PHP_INT_SIZE != 8) die('skip 64-bit only');
1112
?>
1213
--FILE--
1314
<?php

ext/gd/tests/imagecolorallocate_variation4.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ if(!extension_loaded('gd')) {
88
if(!function_exists('imagecreatetruecolor')) {
99
die('skip imagecreatetruecolor function is not available');
1010
}
11+
if (PHP_INT_SIZE != 8) die('skip 64-bit only');
1112
?>
1213
--FILE--
1314
<?php
@@ -210,4 +211,4 @@ int(657920)
210211

211212
Warning: imagecolorallocate() expects parameter 4 to be long, resource given in %s on line %d
212213
NULL
213-
===DONE===
214+
===DONE===

ext/intl/tests/bug53512.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
--TEST--
22
Bug #53512 (NumberFormatter::setSymbol crash on bogus $attr values)
33
--SKIPIF--
4-
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
4+
<?php if( !extension_loaded( 'intl' ) ) die('skip');
5+
if (PHP_INT_SIZE != 8) die('skip 64-bit only');
6+
?>
57
--FILE--
68
<?php
79

ext/intl/tests/bug61487.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
--TEST--
22
grapheme() str[i]pos limits
33
--SKIPIF--
4-
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
4+
<?php if( !extension_loaded( 'intl' ) ) die('skip');
5+
if (PHP_INT_SIZE != 8) die('skip 64-bit only');
6+
?>
57
--FILE--
68
<?php
79
var_dump(grapheme_stripos(1,1,2147483648));

ext/intl/tests/collator_get_locale2.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ get_locale() icu >= 4.8
33
--SKIPIF--
44
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
55
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
6+
<?php if (PHP_INT_SIZE != 8) die('skip 64-bit only'); ?>
67
--FILE--
78
<?php
89

ext/intl/tests/dateformat_get_locale.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
--TEST--
22
datefmt_get_locale_code()
33
--SKIPIF--
4-
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
4+
<?php if( !extension_loaded( 'intl' ) ) die('skip');
5+
if (PHP_INT_SIZE != 8) die('skip 64-bit only');
6+
?>
57
--FILE--
68
<?php
79

ext/intl/tests/formatter_get_set_symbol2.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ numfmt_get/set_symbol() icu >= 4.8
33
--SKIPIF--
44
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
55
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
6+
<?php if (PHP_INT_SIZE != 8) die('skip 64-bit only'); ?>
67
--FILE--
78
<?php
89

ext/mbstring/tests/mb_encode_mimeheader_variation5.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Test mb_encode_mimeheader() function : usage variations - Pass different data ty
44
<?php
55
extension_loaded('mbstring') or die('skip');
66
function_exists('mb_encode_mimeheader') or die("skip mb_encode_mimeheader() is not available in this build");
7+
if (PHP_INT_SIZE != 8) die('skip 64-bit only');
78
?>
89
--FILE--
910
<?php

ext/mbstring/tests/mb_split_variation3.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Test mb_split() function : usage variations - different parameter types for lim
44
<?php
55
extension_loaded('mbstring') or die('skip');
66
function_exists('mb_split') or die("skip mb_split() is not available in this build");
7+
if (PHP_INT_SIZE != 8) die('skip 64-bit only');
78
?>
89
--FILE--
910
<?php
@@ -328,4 +329,4 @@ array(1) {
328329

329330
Warning: mb_split() expects parameter 3 to be long, resource given in %s on line %d
330331
bool(false)
331-
Done
332+
Done

ext/mbstring/tests/mb_stripos_variation3.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Test mb_stripos() function : usage variations - pass different data types as $of
44
<?php
55
extension_loaded('mbstring') or die('skip');
66
function_exists('mb_stripos') or die("skip mb_stripos() is not available in this build");
7+
if (PHP_INT_SIZE != 8) die('skip 64-bit only');
78
?>
89
--FILE--
910
<?php

ext/mbstring/tests/mb_strpos_variation3.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Test mb_strpos() function : usage variations - pass different data types as $off
44
<?php
55
extension_loaded('mbstring') or die('skip');
66
function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
7+
if (PHP_INT_SIZE != 8) die('skip 64-bit only');
78
?>
89
--FILE--
910
<?php

ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Test mb_strripos() function : usage variations - pass different data types as $o
44
<?php
55
extension_loaded('mbstring') or die('skip');
66
function_exists('mb_strripos') or die("skip mb_strripos() is not available in this build");
7+
if (PHP_INT_SIZE != 8) die('skip 64-bit only');
78
?>
89
--FILE--
910
<?php
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--TEST--
2+
Bug #68545 Use after free vulnerability in unserialize()
3+
--FILE--
4+
<?php
5+
for ($i=4; $i<100; $i++) {
6+
$m = new StdClass();
7+
8+
$u = array(1);
9+
10+
$m->aaa = array(1,2,&$u,4,5);
11+
$m->bbb = 1;
12+
$m->ccc = &$u;
13+
$m->ddd = str_repeat("A", $i);
14+
15+
$z = serialize($m);
16+
$z = str_replace("bbb", "aaa", $z);
17+
$y = unserialize($z);
18+
$z = serialize($y);
19+
}
20+
?>
21+
===DONE===
22+
--EXPECTF--
23+
===DONE===

0 commit comments

Comments
 (0)