com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/spl/spl_directory.c
| From: | Christoph Michael Becker | Date: | Fri, 22 Jul 2016 13:27:55 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/spl/spl_directory.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93315@lists.php.net to get a copy of this message | ||
Commit: 9a2207c90ae1c699d9e34223f51b6c13dfbda798
Author: Christoph M. Becker <cmb@php.net> Fri, 22 Jul 2016 15:27:16 +0200
Parents: 9622f973a5a4e9ca42903bb48c3c467d86c578d5 6b116932b28b76c3f075921a0f2660f7bf5ac4e1
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9a2207c90ae1c699d9e34223f51b6c13dfbda798
Log:
Merge branch 'PHP-5.6' into PHP-7.0
# Resolved conflicts:
# ext/spl/spl_directory.c
Changed paths:
MM NEWS
MM ext/spl/spl_directory.c
Diff:
diff --cc NEWS
index f3ea846,f04f36b..f6bfc5d
--- a/NEWS
+++ b/NEWS
@@@ -57,55 -44,39 +57,57 @@@ PH
. Fixed bug #72222 (ReflectionClass::export doesn't handle array constants).
(Nikita Nefedov)
-- Standard:
- . Fixed bug #72330 (CSV fields incorrectly split if escape char followed by
- UTF chars). (cmb)
+- SimpleXML:
+ . Fixed bug #72588 (Using global var doesn't work while accessing SimpleXML
+ element). (Laruence)
- SPL:
- . Fixed bug #72122 (IteratorIterator breaks '@' error suppression). (kinglozzer)
+ . Fixed bug #55701 (GlobIterator throws LogicException). (Valentin VĂLCIU)
+ . Fixed bug #72646 (SplFileObject::getCsvControl does not return the escape
+ character). (cmb)
-21 Jul 2016, PHP 5.6.24
+- SQLite3:
+ . Fixed bug #72571 (SQLite3::bindValue, SQLite3::bindParam crash). (Laruence)
+
+- Standard:
+ . Fixed bug #72622 (array_walk + array_replace_recursive create references
+ from nothing). (Laruence)
+ . Fixed bug #72152 (base64_decode $strict fails to detect null byte).
+ (Lauri Kenttä)
+ . Fixed bug #72263 (base64_decode skips a character after padding in strict
+ mode). (Lauri Kenttä)
+ . Fixed bug #72264 (base64_decode $strict fails with whitespace between
+ padding). (Lauri Kenttä)
+ .. Fixed bug #72330 (CSV fields incorrectly split if escape char followed by
+ UTF chars). (cmb)
+
+- Wddx:
+ . Fixed bug #72564 (boolean always deserialized as "true") (Remi)
+
+21 Jul 2016 PHP 7.0.9
- Core:
- . Fixed bug #71936 (Segmentation fault destroying HTTP_RAW_POST_DATA).
- (mike dot laspina at gmail dot com, Remi)
- . Fixed bug #72496 (Cannot declare public method with signature incompatible
- with parent private method). (Pedro Magalhães)
- . Fixed bug #72138 (Integer Overflow in Length of String-typed ZVAL). (Stas)
+ .. Fixed bug #72508 (strange references after recursive function call and
+ "switch" statement). (Laruence)
. Fixed bug #72513 (Stack-based buffer overflow vulnerability in
- virtual_file_ex). (loianhtuan at gmail dot com)
- . Fixed bug #72562 (Use After Free in unserialize() with Unexpected Session
- Deserialization). (taoguangchen at icloud dot com)
- . Fixed bug #72573 (HTTP_PROXY is improperly trusted by some PHP libraries and
- applications). (CVE-2016-5385) (Stas)
+ virtual_file_ex). (Stas)
+ . Fixed bug #72573 (HTTP_PROXY is improperly trusted by some PHP libraries
+ and applications). (Stas)
- bz2:
- . Fixed bug #72447 (Type Confusion in php_bz2_filter_create()). (gogil at
- stealien dot com).
. Fixed bug #72613 (Inadequate error handling in bzread()). (Stas)
-- EXIF:
- . Fixed bug #50845 (exif_read_data() returns corrupted exif headers).
- (Bartosz Dziewoński)
-- EXIF:
+- CLI:
+ . Fixed bug #72484 (SCRIPT_FILENAME shows wrong path if the user specify
+ router.php). (Laruence)
+
+- COM:
+ . Fixed bug #72498 (variant_date_from_timestamp null dereference). (Anatol)
+
+- Curl:
+ . Fixed bug #72541 (size_t overflow lead to heap corruption). (Stas)
+
+- Exif:
. Fixed bug #72603 (Out of bound read in exif_process_IFD_in_MAKERNOTE).
(Stas)
. Fixed bug #72618 (NULL Pointer Dereference in exif_process_user_comment).
diff --cc ext/spl/spl_directory.c
index 6a49d97,c083345..17b9e8f
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@@ -2656,16 -2691,16 +2656,16 @@@ SPL_METHOD(SplFileObject, fputcsv
}
/* }}} */
-/* {{{ proto void SplFileObject::setCsvControl([string delimiter = ',' [, string
enclosure = '"' [, string escape = '\\']]])
+/* {{{ proto void SplFileObject::setCsvControl([string delimiter [, string enclosure [, string
escape ]]])
- Set the delimiter and enclosure character used in fgetcsv */
+ Set the delimiter, enclosure and escape character used in fgetcsv */
SPL_METHOD(SplFileObject, setCsvControl)
{
- spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis()
TSRMLS_CC);
+ spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(getThis());
char delimiter = ',', enclosure = '"', escape='\\';
char *delim = NULL, *enclo = NULL, *esc = NULL;
- int d_len = 0, e_len = 0, esc_len = 0;
+ size_t d_len = 0, e_len = 0, esc_len = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sss", &delim, &d_len,
&enclo, &e_len, &esc, &esc_len) == SUCCESS) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|sss", &delim, &d_len, &enclo,
&e_len, &esc, &esc_len) == SUCCESS) {
switch(ZEND_NUM_ARGS())
{
case 3:
@@@ -2700,11 -2735,11 +2700,11 @@@
/* }}} */
/* {{{ proto array SplFileObject::getCsvControl()
- Get the delimiter and enclosure character used in fgetcsv */
+ Get the delimiter, enclosure and escape character used in fgetcsv */
SPL_METHOD(SplFileObject, getCsvControl)
{
- spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis()
TSRMLS_CC);
+ spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(getThis());
- char delimiter[2], enclosure[2];
+ char delimiter[2], enclosure[2], escape[2];
array_init(return_value);
@@@ -2712,9 -2747,12 +2712,12 @@@
delimiter[1] = '\0';
enclosure[0] = intern->u.file.enclosure;
enclosure[1] = '\0';
+ escape[0] = intern->u.file.escape;
+ escape[1] = '\0';
- add_next_index_string(return_value, delimiter, 1);
- add_next_index_string(return_value, enclosure, 1);
- add_next_index_string(return_value, escape, 1);
+ add_next_index_string(return_value, delimiter);
+ add_next_index_string(return_value, enclosure);
++ add_next_index_string(return_value, escape);
}
/* }}} */