Bug #71876 [Opn->Fbk]: Memory corruption htmlspecialchars(): charset `*' not supported

From: Date: Mon, 21 Mar 2016 23:37:41 +0000
Subject: Bug #71876 [Opn->Fbk]: Memory corruption htmlspecialchars(): charset `*' not supported
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200014@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71876&edit=1

 ID:                 71876
 Updated by:         requinix@php.net
 Reported by:        the_djmaze at hotmail dot com
 Summary:            Memory corruption htmlspecialchars(): charset `*'
                     not supported
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            Strings related
 Operating System:   Linux
 PHP Version:        7.0.4
 Block user comment: N
 Private report:     N

 New Comment:

I'm not sure why this is "memory corruption"?

https://3v4l.org/n4Qim

Which Linux? What's your configure command? Any Zend extensions installed? (Try without them.)


Previous Comments:
------------------------------------------------------------------------
[2016-03-21 23:24:35] the_djmaze at hotmail dot com

Description:
------------
Running the following code several times yields memory corruption.

Test script:
---------------
<?php
error_reporting(E_ALL);
ini_set('display_errors',1);
ini_set('log_errors',0);
class Text
{
	function run()
	{
		eval('static::echo_data(\'test\');');
	}
	protected static function echo_data($data)
	{
		echo htmlspecialchars($data, ENT_NOQUOTES);
	}
}
$test = new Text;
$test->run();
?>

Expected result:
----------------
No warning at all by using ini_get("default_charset")

Actual result:
--------------
Warning: htmlspecialchars(): charset `*' not supported
Where '*' is anything random.


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=71876&edit=1


Thread (17 messages)

« previous php.bugs (#200014) next »