Bug #66964 [Csd]: mb_convert_variables() cannot detect recursion
| From: | yohgaki@php.net | Date: | Tue, 06 Sep 2016 10:36:51 +0000 |
| Subject: | Bug #66964 [Csd]: mb_convert_variables() cannot detect recursion | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-203832@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66964&edit=1
ID: 66964
Updated by: yohgaki@php.net
Reported by: ryosuke_i_628 at yahoo dot co dot jp
Summary: mb_convert_variables() cannot detect recursion
Status: Closed
Type: Bug
Package: mbstring related
PHP Version: Irrelevant
Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
Modified to detect recursion.
However, it does not finish all conversions. It finishes conversion as soon as it detects recursion.
This is due to the way recursion is handled currently. i.e. Recursion is handled non recursive
calls.
To change this behavior, mb_convert_variables() has to be modified to use recursive call.
Previous Comments:
------------------------------------------------------------------------
[2016-09-06 09:30:01] yohgaki@php.net
Automatic comment on behalf of yohgaki
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a25f6f89cd68b5e3ba73381094771a011aec6f04
Log: Fixed Bug #66964 mb_convert_variables() cannot detect recursion
------------------------------------------------------------------------
[2014-03-27 07:37:11] ryosuke_i_628 at yahoo dot co dot jp
Description:
------------
mb_convert_variables() cannot detect recursion.
It should be able to detect like var_dump() or print_r().
Test script:
---------------
<?php
$a[] = &$a;
mb_convert_variables('utf-8', 'auto', $a);
Expected result:
----------------
Success with no outputs.
Actual result:
--------------
Fatal error: Out of memory (allocated 542113792) (tried to allocate 541851648 bytes) in ... on line
3
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66964&edit=1