mirror of
https://github.com/php/php-src.git
synced 2026-04-28 10:43:30 +02:00
fc1db70f10
zend_save_lexical_state() can be nested multiple times, for example for the parser initialization and then in the heredoc lexing. The input should not be freed if we restore to the same filtered string. Closes GH-16716.
20 lines
270 B
PHP
20 lines
270 B
PHP
--TEST--
|
|
GH-16630 (UAF in lexer with encoding translation and heredocs)
|
|
--EXTENSIONS--
|
|
mbstring
|
|
--INI--
|
|
zend.multibyte=On
|
|
zend.script_encoding=ISO-8859-1
|
|
internal_encoding=EUC-JP
|
|
--FILE--
|
|
<?php
|
|
$data3 = <<<CODE
|
|
heredoc
|
|
text
|
|
CODE;
|
|
echo $data3;
|
|
?>
|
|
--EXPECT--
|
|
heredoc
|
|
text
|