Edit report at https://bugs.php.net/bug.php?id=63874&edit=1
ID: 63874 User updated by: igor at wiedler dot ch Reported by: igor at wiedler dot ch Summary: Segfault if php_strip_whitespace has heredoc 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: Fix confirmed. Thanks! Previous Comments: ------------------------------------------------------------------------ [2012-12-30 04:17:38] pierr...@php.net 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) ------------------------------------------------------------------------ [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