mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
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
|