]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6' into PHP-7.0
authorChristoph M. Becker <cmbecker69@gmx.de>
Tue, 16 Aug 2016 23:14:12 +0000 (01:14 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Tue, 16 Aug 2016 23:22:11 +0000 (01:22 +0200)
1  2 
NEWS
ext/xml/tests/bug72085.phpt
ext/xml/xml.c

diff --cc NEWS
index d17a9365a40526bb2c96b5e5327351df509aca9f,30a17c1d057c6c5e8fa4be6072bdcd26d7513462..e9c1b73b619318f6132eae0cdd55bae58215d5d0
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -31,39 -21,19 +31,41 @@@ PH
      specifying a sequence). (Pablo Santiago Sánchez, Matteo)
    . Fixed bug #72759 (Regression in pgo_pgsql). (Anatol)
  
 +- Reflection:
 +  . Fixed bug #72846 (getConstant for a array constant with constant values
 +    returns NULL/NFC/UKNOWN). (Laruence)
 +
 +- Session:
 +  . Fixed bug #72724 (PHP7: session-uploadprogress kills httpd). (Nikita)
 +
  - Standard:
 -  . Fixed bug #72823 (strtr out-of-bound access). (cmb)
 +  . Fixed bug #55451 (substr_compare NULL length interpreted as 0). (Lauri
 +    Kenttä)
    . Fixed bug #72278 (getimagesize returning FALSE on valid jpg). (cmb)
  
 +- Streams:
 +  . Fixed bug #72764 (ftps:// opendir wrapper data channel encryption fails
 +    with IIS FTP 7.5, 8.5). (vhuk)
 +
+ - XML:
+   . Fixed bug #72085 (SEGV on unknown address zif_xml_parse). (cmb)
  
 -18 Aug 2016, PHP 5.6.25
 +?? ??? 2016 PHP 7.0.10
  
  - Core:
 +  . Fixed bug #72629 (Caught exception assignment to variables ignores
 +    references). (Laruence)
 +  . Fixed bug #72594 (Calling an earlier instance of an included anonymous
 +    class fatals). (Laruence)
    . Fixed bug #72581 (previous property undefined in Exception after
      deserialization). (Laruence)
 +  . Fixed bug #72496 (Cannot declare public method with signature incompatible
 +    with parent private method). (Pedro Magalhães)
    . Fixed bug #72024 (microtime() leaks memory). (maroszek at gmx dot net)
 +  . Fixed bug #71911 (Unable to set --enable-debug on building extensions by
 +    phpize on Windows). (Yuji Uchiyama)
 +  . Fixed bug causing ClosedGeneratorException being thrown into the calling
 +    code instead of the Generator yielding from. (Bob)
    . Implemented FR #72614 (Support "nmake test" on building extensions by
      phpize). (Yuji Uchiyama)
    . Fixed bug #72641 (phpize (on Windows) ignores PHP_PREFIX).
index 0000000000000000000000000000000000000000,2989289cb1c38d6bac71a8e7bd731e7e6b945d44..44ae1f1cde327843a498ba50db9d60223b69db11
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,74 +1,74 @@@
 -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d
+ --TEST--
+ Bug #72085 (SEGV on unknown address zif_xml_parse)
+ --SKIPIF--
+ <?php
+ if (!extension_loaded('xml')) die('skip xml extension not available');
+ ?>
+ --FILE--
+ <?php
+ $var1 = xml_parser_create_ns();
+ xml_set_element_handler($var1, new Exception(""), 4096);
+ xml_parse($var1,  str_repeat("<a>", 10));
+ ?>
+ ===DONE===
+ --EXPECTF--
 -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d
++Warning: Invalid callback Exception in %s%ebug72085.php:%d
+ Stack trace:
+ #0 {main}, no array or string given in %s%ebug72085.php on line %d
+ Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d
 -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d
++Warning: Invalid callback Exception in %s%ebug72085.php:%d
+ Stack trace:
+ #0 {main}, no array or string given in %s%ebug72085.php on line %d
+ Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d
 -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d
++Warning: Invalid callback Exception in %s%ebug72085.php:%d
+ Stack trace:
+ #0 {main}, no array or string given in %s%ebug72085.php on line %d
+ Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d
 -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d
++Warning: Invalid callback Exception in %s%ebug72085.php:%d
+ Stack trace:
+ #0 {main}, no array or string given in %s%ebug72085.php on line %d
+ Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d
 -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d
++Warning: Invalid callback Exception in %s%ebug72085.php:%d
+ Stack trace:
+ #0 {main}, no array or string given in %s%ebug72085.php on line %d
+ Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d
 -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d
++Warning: Invalid callback Exception in %s%ebug72085.php:%d
+ Stack trace:
+ #0 {main}, no array or string given in %s%ebug72085.php on line %d
+ Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d
 -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d
++Warning: Invalid callback Exception in %s%ebug72085.php:%d
+ Stack trace:
+ #0 {main}, no array or string given in %s%ebug72085.php on line %d
+ Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d
 -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d
++Warning: Invalid callback Exception in %s%ebug72085.php:%d
+ Stack trace:
+ #0 {main}, no array or string given in %s%ebug72085.php on line %d
+ Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d
 -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d
++Warning: Invalid callback Exception in %s%ebug72085.php:%d
+ Stack trace:
+ #0 {main}, no array or string given in %s%ebug72085.php on line %d
+ Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d
++Warning: Invalid callback Exception in %s%ebug72085.php:%d
+ Stack trace:
+ #0 {main}, no array or string given in %s%ebug72085.php on line %d
+ Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d
+ ===DONE===
diff --cc ext/xml/xml.c
index d788b9b0b82aa4d66b8bf9b4f2cd361a42e75e60,9eba47be267791ec4a1d126fe1bf117d2562ceca..aabb41415732f0d15da53376dca2e394f47e1b87
@@@ -493,24 -528,38 +493,25 @@@ static void xml_call_handler(xml_parse
                fci.no_separation = 0;
                /*fci.function_handler_cache = &function_ptr;*/
  
 -              result = zend_call_function(&fci, NULL TSRMLS_CC);
 +              result = zend_call_function(&fci, NULL);
                if (result == FAILURE) {
 -                      zval **method;
 -                      zval **obj;
 +                      zval *method;
 +                      zval *obj;
  
                        if (Z_TYPE_P(handler) == IS_STRING) {
 -                              php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler %s()", Z_STRVAL_P(handler));
 +                              php_error_docref(NULL, E_WARNING, "Unable to call handler %s()", Z_STRVAL_P(handler));
-                       } else if ((obj = zend_hash_index_find(Z_ARRVAL_P(handler), 0)) != NULL &&
+                       } else if (Z_TYPE_P(handler) == IS_ARRAY &&
 -                                         zend_hash_index_find(Z_ARRVAL_P(handler), 0, (void **) &obj) == SUCCESS &&
 -                                         zend_hash_index_find(Z_ARRVAL_P(handler), 1, (void **) &method) == SUCCESS &&
 -                                         Z_TYPE_PP(obj) == IS_OBJECT &&
 -                                         Z_TYPE_PP(method) == IS_STRING) {
 -                              php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler %s::%s()", Z_OBJCE_PP(obj)->name, Z_STRVAL_PP(method));
 -                      } else
 -                              php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler");
 -              }
 -
 -              for (i = 0; i < argc; i++) {
 -                      zval_ptr_dtor(args[i]);
++                                         (obj = zend_hash_index_find(Z_ARRVAL_P(handler), 0)) != NULL &&
 +                                         (method = zend_hash_index_find(Z_ARRVAL_P(handler), 1)) != NULL &&
 +                                         Z_TYPE_P(obj) == IS_OBJECT &&
 +                                         Z_TYPE_P(method) == IS_STRING) {
 +                              php_error_docref(NULL, E_WARNING, "Unable to call handler %s::%s()", ZSTR_VAL(Z_OBJCE_P(obj)->name), Z_STRVAL_P(method));
 +                      } else 
 +                              php_error_docref(NULL, E_WARNING, "Unable to call handler");
                }
 -              efree(args);
 -
 -              if (result == FAILURE) {
 -                      return NULL;
 -              } else {
 -                      return EG(exception) ? NULL : retval;
 -              }
 -      } else {
 -              for (i = 0; i < argc; i++) {
 -                      zval_ptr_dtor(&argv[i]);
 -              }
 -              return NULL;
 +      } 
 +      for (i = 0; i < argc; i++) {
 +              zval_ptr_dtor(&argv[i]);
        }
  }
  /* }}} */