. Fixded bug #72736 (Slow performance when fetching large dataset with mysqli
/ PDO). (Dmitry)
+- PCRE:
+ . Fixed bug #73392 (A use-after-free in zend allocator management).
+ (Laruence)
+
10 Nov 2016 PHP 7.0.13
- Core:
RETVAL_STR(result);
} else {
zend_string_release(result);
+ RETVAL_NULL();
}
+ } else {
+ RETVAL_NULL();
}
}
Z_PARAM_ZVAL_EX(zcount, 0, 1)
ZEND_PARSE_PARAMETERS_END();
- ZVAL_UNDEF(&zv);
ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(pattern), str_idx, replace) {
if (str_idx) {
ZVAL_STR_COPY(®ex, str_idx);
zval_ptr_dtor(®ex);
- if (Z_ISUNDEF(zv)) {
- RETURN_NULL();
- }
-
ZVAL_COPY_VALUE(return_value, &zv);
if (UNEXPECTED(EG(exception))) {
--- /dev/null
+--TEST--
+Bug #73392 (A use-after-free in zend allocator management)
+--FILE--
+<?php
+class Rep {
+ public function __invoke() {
+ return "d";
+ }
+}
+class Foo {
+ public static function rep($rep) {
+ return "ok";
+ }
+}
+function b() {
+ return "b";
+}
+var_dump(preg_replace_callback_array(
+ array(
+ "/a/" => 'b', "/b/" => function () { return "c"; }, "/c/" => new Rep, "reporting" => array("Foo", "rep"), "a1" => array("Foo", "rep"),
+ ), 'a'));
+?>
+
+--EXPECTF--
+Warning: preg_replace_callback_array(): Delimiter must not be alphanumeric or backslash in %sbug73392.php on line %d
+
+Warning: preg_replace_callback_array(): Delimiter must not be alphanumeric or backslash in %sbug73392.php on line %d
+NULL