Skip to content

Commit fe0ca27

Browse files
committed
Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
2 parents ef2db26 + 968fbc6 commit fe0ca27

File tree

143 files changed

+3719
-3677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+3719
-3677
lines changed

EXTENSIONS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,12 @@ MAINTENANCE: Maintained
385385
STATUS: Working
386386
SINCE: 4.0.4
387387
-------------------------------------------------------------------------------
388+
EXTENSION: hash
389+
PRIMARY MAINTAINER: Sara Golemon <[email protected]>, Mike Wallner <[email protected]>, Anatol Belski <[email protected]>
390+
MAINTENANCE: Maintained
391+
STATUS: Working
392+
SINCE: 5.1.2
393+
-------------------------------------------------------------------------------
388394
EXTENSION: iconv
389395
PRIMARY MAINTAINER: Moriyoshi Koizumi <[email protected]>
390396
MAINTENANCE: Maintained

NEWS

Lines changed: 181 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,183 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3-
?? ??? 2014, PHP 5.4.32
3+
?? ??? 2015 PHP 5.4.40
4+
5+
- SOAP:
6+
. Fixed bug #69152 (Type Confusion Infoleak Vulnerability in unserialize()
7+
with SoapFault). (Dmitry)
8+
9+
- Postgres:
10+
. Fixed bug #68741 (Null pointer deference) (CVE-2015-1352). (Xinchen Hui)
11+
12+
19 Mar 2015 PHP 5.4.39
13+
14+
- Core:
15+
. Fixed bug #68976 (Use After Free Vulnerability in unserialize())
16+
(CVE-2015-0231). (Stas)
17+
. Fixed bug #69134 (Per Directory Values overrides PHP_INI_SYSTEM
18+
configuration options). (Anatol Belski)
19+
. Fixed bug #69207 (move_uploaded_file allows nulls in path). (Stas)
20+
21+
- Ereg:
22+
. Fixed bug #69248 (heap overflow vulnerability in regcomp.c) (CVE-2015-2305).
23+
(Stas)
24+
25+
- SOAP:
26+
. Fixed bug #69085 (SoapClient's __call() type confusion through
27+
unserialize()). (Dmitry)
28+
29+
- ZIP:
30+
. Fixed bug #69253 (ZIP Integer Overflow leads to writing past heap
31+
boundary) (CVE-2015-2331). (Stas)
32+
33+
19 Feb 2015 PHP 5.4.38
34+
35+
- Core:
36+
. Removed support for multi-line headers, as the are deprecated by RFC 7230.
37+
(Stas)
38+
. Added NULL byte protection to exec, system and passthru. (Yasuo)
39+
. Fixed bug #68925 (Mitigation for CVE-2015-0235 – GHOST: glibc gethostbyname
40+
buffer overflow). (Stas)
41+
. Fixed bug #67827 (broken detection of system crypt sha256/sha512 support).
42+
(ncopa at alpinelinux dot org)
43+
. Fixed bug #68942 (Use after free vulnerability in unserialize() with
44+
DateTimeZone). (CVE-2015-0273) (Stas)
45+
46+
- Enchant:
47+
. Fixed bug #68552 (heap buffer overflow in enchant_broker_request_dict()).
48+
(Antony)
49+
50+
- SOAP:
51+
. Fixed bug #67427 (SoapServer cannot handle large messages)
52+
(brandt at docoloc dot de)
53+
54+
22 Jan 2015 PHP 5.4.37
55+
- Core:
56+
. Fixed bug #68710 (Use After Free Vulnerability in PHP's unserialize()).
57+
(CVE-2015-0231) (Stefan Esser)
58+
59+
- CGI:
60+
. Fixed bug #68618 (out of bounds read crashes php-cgi). (CVE-2014-9427)
61+
(Stas)
62+
63+
- EXIF:
64+
. Fixed bug #68799: Free called on unitialized pointer. (CVE-2015-0232)
65+
(Stas)
66+
67+
- Fileinfo:
68+
. Removed readelf.c and related code from libmagic sources
69+
(Remi, Anatol)
70+
. Fixed bug #68735 (fileinfo out-of-bounds memory access).
71+
(Anatol)
72+
73+
- OpenSSL:
74+
. Fixed bug #55618 (use case-insensitive cert name matching).
75+
(Daniel Lowrey)
76+
77+
18 Dec 2014 PHP 5.4.36
78+
79+
- Core:
80+
. Upgraded crypt_blowfish to version 1.3. (Leigh)
81+
. Fixed bug #68545 (NULL pointer dereference in unserialize.c). (Anatol)
82+
. Fixed bug #68594 (Use after free vulnerability in unserialize()).
83+
(CVE-2014-8142) (Stefan Esser)
84+
85+
- Mcrypt:
86+
. Fixed possible read after end of buffer and use after free. (Dmitry)
87+
88+
13 Nov 2014 PHP 5.4.35
89+
90+
- Core:
91+
. Fixed bug #68365 (zend_mm_heap corrupted after memory overflow in
92+
zend_hash_copy). (Dmitry)
93+
94+
- Fileinfo:
95+
. Fixed bug #68283 (fileinfo: out-of-bounds read in elf note headers).
96+
(CVE-2014-3710) (Remi)
97+
98+
- GMP:
99+
. Fixed bug #63595 (GMP memory management conflicts with other libraries
100+
using GMP). (Remi)
101+
102+
- PDO_pgsql:
103+
. Fixed bug #66584 (Segmentation fault on statement deallocation) (Matteo)
104+
105+
16 Oct 2014, PHP 5.4.34
106+
107+
- Fileinfo:
108+
. Fixed bug #66242 (libmagic: don't assume char is signed). (ArdB)
109+
110+
- Core:
111+
. Fixed bug #67985 (Incorrect last used array index copied to new array after
112+
unset). (Tjerk)
113+
. Fixed bug #68044 (Integer overflow in unserialize() (32-bits only)).
114+
(CVE-2014-3669) (Stas)
115+
116+
- cURL:
117+
. Fixed bug #68089 (NULL byte injection - cURL lib). (Stas)
118+
119+
- EXIF:
120+
. Fixed bug #68113 (Heap corruption in exif_thumbnail()). (CVE-2014-3670)
121+
(Stas)
122+
123+
- OpenSSL:
124+
. Reverted fixes for bug #41631, due to regressions. (Stas)
125+
126+
- XMLRPC:
127+
. Fixed bug #68027 (Global buffer overflow in mkgmtime() function).
128+
(CVE-2014-3668) (Stas)
129+
130+
18 Sep 2014, PHP 5.4.33
131+
132+
- Core:
133+
. Fixed bug #47358 (glob returns error, should be empty array()). (Pierre)
134+
. Fixed bug #65463 (SIGSEGV during zend_shutdown()). (Keyur Govande)
135+
. Fixed bug #66036 (Crash on SIGTERM in apache process). (Keyur Govande)
136+
137+
- OpenSSL:
138+
. Fixed bug #41631 (socket timeouts not honored in blocking SSL reads).
139+
(Daniel Lowrey)
140+
141+
- Date:
142+
. Fixed bug #66091 (memory leaks in DateTime constructor). (Tjerk)
143+
144+
- FPM:
145+
. Fixed #67606 (FPM with mod_fastcgi/apache2.4 is broken). (David Zuelke)
146+
147+
- GD:
148+
. Made fontFetch's path parser thread-safe. (Sara)
149+
150+
- Wddx:
151+
. Fixed bug #67873 (Segfaults in php_wddx_serialize_var). (Anatol, Remi)
152+
153+
- Zlib:
154+
. Fixed bug #67724 (chained zlib filters silently fail with large amounts of
155+
data). (Mike)
156+
. Fixed bug #67865 (internal corruption phar error). (Mike)
157+
158+
21 Aug 2014, PHP 5.4.32
4159

5160
- COM:
6-
. Fixed missing type checks in com_event_sink (Yussuf Khalil, Stas).
161+
. Fixed missing type checks in com_event_sink. (Yussuf Khalil, Stas)
162+
. Fixed bug #41577 (DOTNET is successful once per server run).
163+
(Aidas Kasparas)
164+
165+
- Fileinfo:
166+
. Fixed bug #67705 (extensive backtracking in rule regular expression).
167+
(CVE-2014-3538) (Remi)
168+
. Fixed bug #67716 (Segfault in cdf.c). (CVE-2014-3587) (Remi)
169+
170+
- GD:
171+
. Fixed bug #66901 (php-gd 'c_color' NULL pointer dereference).
172+
(CVE-2014-2497). (Remi)
173+
. Fixed bug #67730 (Null byte injection possible with imagexxx functions).
174+
(CVE-2014-5120) (Ryan Mauger)
175+
176+
- LiteSpeed:
177+
. Updated LiteSpeed SAPI code from V5.5 to V6.6 (George Wang)
178+
179+
- Network:
180+
. Fixed bug #67717 (segfault in dns_get_record). (CVE-2014-3597) (Remi)
7181

8182
- Milter:
9183
. Fixed bug #67715 (php-milter does not build and crashes randomly). (Mike)
@@ -18,11 +192,11 @@ PHP NEWS
18192
with control-c). (Dmitry Saprykin, Johannes)
19193

20194
- Sessions:
21-
. Fixed missing type checks in php_session_create_id (Yussuf Khalil, Stas).
195+
. Fixed missing type checks in php_session_create_id. (Yussuf Khalil, Stas).
22196

23197
- SPL:
24198
. Fixed bug #67539 (ArrayIterator use-after-free due to object change during
25-
sorting). (research at insighti dot org, Laruence)
199+
sorting). (CVE-2014-4698) (research at insighti dot org, Laruence)
26200
. Fixed bug #67538 (SPL Iterators use-after-free). (CVE-2014-4670) (Laruence)
27201

28202
- Core:
@@ -32,6 +206,9 @@ PHP NEWS
32206
. Fixed bug #60616 (odbc_fetch_into returns junk data at end of multi-byte
33207
char fields). (Keyur)
34208

209+
- MySQLi:
210+
. Fixed bug #67839 (mysqli does not handle 4-byte floats correctly). (Keyur)
211+
35212
24 Jul 2014, PHP 5.4.31
36213

37214
- Core:

README.GIT-RULES

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,29 @@ Currently we have the following branches in use::
4545

4646
master The active development branch.
4747

48+
PHP-5.6 Is used to release the PHP 5.6.x series. This is a current
49+
stable version and is open for bugfixes only.
50+
4851
PHP-5.5 Is used to release the PHP 5.5.x series. This is a current
4952
stable version and is open for bugfixes only.
5053

5154
PHP-5.4 Is used to release the PHP 5.4.x series. This is a current
5255
stable version and is open for bugfixes only.
5356

54-
PHP-5.3 Is used to release the PHP 5.3.x series. This is currently
55-
in extended support and open forsecurity fixes only. Triaged
56-
57+
PHP-5.3 This branch is closed.
5758

5859
PHP-5.2 This branch is closed.
5960

6061
PHP-5.1 This branch is closed.
6162

6263
PHP-4.4 This branch is closed.
6364

65+
PHP-X.Y.Z These branches are used for the release managers for tagging
66+
the releases, hence they are closed to the general public.
67+
6468
The next few rules are more of a technical nature::
6569

66-
1. All changes should first go to the lowest branch (i.e. 5.3) and then
70+
1. All changes should first go to the lowest branch (i.e. 5.4) and then
6771
get merged up to all other branches. If a change is not needed for
6872
later branches (i.e. fixes for features which where dropped from later
6973
branches) an empty merge should be done.

README.RELEASE_PROCESS

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ last commit id to web/php.git, then, mirrors will now sync
183183
Getting the stable release announced
184184
------------------------------------
185185

186-
1. Run the bumpRelease script for phpweb on your local checkout
186+
1. Update phpweb/include/releases.inc with the old release info
187+
(updates the download archives)
187188

188-
a. ``php bin/bumpRelease 5`` to create the release file (releases/x_y_z.php)
189-
The release announcement file should list in detail security fixes and
190-
changes in behavior (whether due to a bug fix or not).
189+
a. You can run ``php bin/bumpRelease 5`` if you are making a release for the
190+
highest branch, otherwise you have to do this manually, see point 1.b
191191

192192
b. In case multiple PHP minor versions are in active development you have
193193
to manually copy the old information to include/releases.inc
@@ -207,8 +207,9 @@ Getting the stable release announced
207207

208208
f. if the windows builds aren't ready yet prefix the "windows" key with a dot (".windows")
209209

210-
3. Update phpweb/include/releases.php with the old release info
211-
(updates the download archives)
210+
3. Create the release file (releases/x_y_z.php)
211+
Usually we use the same content as for point 6, but included in php template
212+
instead of the release xml.
212213

213214
4. Update php-qa/include/release-qa.php and add the next version as an QARELEASE
214215
(prepare for next RC)

Zend/tests/bug67985.phpt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
Bug #67985 - Last used array index not copied to new array at assignment
3+
--FILE--
4+
<?php
5+
6+
$a = ['zero', 'one', 'two'];
7+
unset($a[2]);
8+
$b = $a;
9+
$a[] = 'three';
10+
$b[] = 'three';
11+
12+
var_dump($a === $b);
13+
14+
?>
15+
--EXPECT--
16+
bool(true)

Zend/zend.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,20 @@ void zend_shutdown(TSRMLS_D) /* {{{ */
813813
zend_shutdown_timeout_thread();
814814
#endif
815815
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
816+
817+
if (EG(active))
818+
{
819+
/*
820+
* The order of destruction is important here.
821+
* See bugs #65463 and 66036.
822+
*/
823+
zend_hash_reverse_apply(GLOBAL_FUNCTION_TABLE, (apply_func_t) zend_cleanup_function_data_full TSRMLS_CC);
824+
zend_hash_reverse_apply(GLOBAL_CLASS_TABLE, (apply_func_t) zend_cleanup_user_class_data TSRMLS_CC);
825+
zend_cleanup_internal_classes(TSRMLS_C);
826+
zend_hash_reverse_apply(GLOBAL_FUNCTION_TABLE, (apply_func_t) clean_non_persistent_function_full TSRMLS_CC);
827+
zend_hash_reverse_apply(GLOBAL_CLASS_TABLE, (apply_func_t) clean_non_persistent_class_full TSRMLS_CC);
828+
}
829+
816830
zend_destroy_modules();
817831

818832
zend_hash_destroy(GLOBAL_FUNCTION_TABLE);

Zend/zend_compile.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,8 @@ ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce TSRMLS_DC);
639639
ZEND_API void zend_cleanup_internal_classes(TSRMLS_D);
640640
ZEND_API int zend_cleanup_function_data(zend_function *function TSRMLS_DC);
641641
ZEND_API int zend_cleanup_function_data_full(zend_function *function TSRMLS_DC);
642+
ZEND_API int clean_non_persistent_function_full(zend_function *function TSRMLS_DC);
643+
ZEND_API int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC);
642644

643645
ZEND_API void destroy_zend_function(zend_function *function TSRMLS_DC);
644646
ZEND_API void zend_function_dtor(zend_function *function);

Zend/zend_execute_API.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static int clean_non_persistent_function(zend_function *function TSRMLS_DC) /* {
108108
}
109109
/* }}} */
110110

111-
static int clean_non_persistent_function_full(zend_function *function TSRMLS_DC) /* {{{ */
111+
ZEND_API int clean_non_persistent_function_full(zend_function *function TSRMLS_DC) /* {{{ */
112112
{
113113
return (function->type == ZEND_INTERNAL_FUNCTION) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
114114
}
@@ -120,7 +120,7 @@ static int clean_non_persistent_class(zend_class_entry **ce TSRMLS_DC) /* {{{ */
120120
}
121121
/* }}} */
122122

123-
static int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC) /* {{{ */
123+
ZEND_API int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC) /* {{{ */
124124
{
125125
return ((*ce)->type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
126126
}

Zend/zend_variables.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
135135
}
136136
ALLOC_HASHTABLE_REL(tmp_ht);
137137
zend_hash_init(tmp_ht, zend_hash_num_elements(original_ht), NULL, ZVAL_PTR_DTOR, 0);
138-
zend_hash_copy(tmp_ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
139138
zvalue->value.ht = tmp_ht;
139+
zend_hash_copy(tmp_ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
140+
tmp_ht->nNextFreeElement = original_ht->nNextFreeElement;
140141
}
141142
break;
142143
case IS_OBJECT:

acinclude.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2800,7 +2800,7 @@ AC_DEFUN([PHP_DETECT_ICC],
28002800

28012801
dnl PHP_DETECT_SUNCC
28022802
dnl Detect if the systems default compiler is suncc.
2803-
dnl We also set some usefull CFLAGS if the user didn't set any
2803+
dnl We also set some useful CFLAGS if the user didn't set any
28042804
AC_DEFUN([PHP_DETECT_SUNCC],[
28052805
SUNCC="no"
28062806
AC_MSG_CHECKING([for suncc])

0 commit comments

Comments
 (0)