- Reflection:
. Fixed bug #70650 (Wrong docblock assignment). (Marcio)
+- Standard:
+ . Fixed bug #70667 (strtr() causes invalid writes and a crashes). (Dmitry)
+
01 Oct 2015, PHP 7.0.0 RC 4
- Core:
zend_ulong *num_bitset;
/* we will collect all possible key lengths */
- num_bitset = ecalloc((slen + (sizeof(zend_ulong)-1)) / sizeof(zend_ulong), sizeof(zend_ulong));
+ num_bitset = ecalloc((slen + sizeof(zend_ulong)) / sizeof(zend_ulong), sizeof(zend_ulong));
memset(bitset, 0, sizeof(bitset));
/* check if original array has numeric keys */
--- /dev/null
+--TEST--
+Bug #70667 (strtr() causes invalid writes and a crashes)
+--FILE--
+<?php
+$a = array("{{language_id}}"=>"255", "{{partner_name}}"=>"test1");
+var_dump(strtr("Sign in to test1", $a));
+?>
+--EXPECT--
+string(16) "Sign in to test1"