Bug #63874 [Opn->Csd]: Segfault if php_strip_whitespace has heredoc
Edit report at https://bugs.php.net/bug.php?id=63874&edit=1
ID: 63874
Updated by: pierrick@php.net
Reported by: igor at wiedler dot ch
Summary: Segfault if php_strip_whitespace has heredoc
-Status: Open
+Status: Closed
Type: Bug
Package: Unknown/Other Function
Operating System: OSX 10.8.2
PHP Version: 5.5Git-2012-12-29 (Git)
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of pierrick
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8228597ecce3ad868d2c6bfca5ff43f29e014296
Log: Fixed bug #63874 (Segfaul if php_strip_whitespace has heredoc)
Previous Comments:
------------------------------------------------------------------------
[2012-12-29 22:32:51] igor at wiedler dot ch
Description:
------------
When a filename that contains a heredoc is passed to php_strip_whitespace, it
results in a segmentation fault / buffer overflow.
Here is the output from --enable-debug:
[Sat Dec 29 22:22:09 2012] Script: '/Users/igor/test.php'
---------------------------------------
/Users/igor/src/php-src/Zend/zend_highlight.c(189) : Block 0x1036a66d8 status:
Beginning: Cached
Freed (invalid)
Start: OK
End: OK
---------------------------------------
Test script:
---------------
<?php
$contents = php_strip_whitespace(__FILE__);
return <<<A
a
A;
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63874&edit=1
Thread (3 messages)