Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'PHP-5.5'

* PHP-5.5:
  Fixed bug #63874 (Segfaul if php_strip_whitespace has heredoc)
  • Loading branch information...
commit ae5d86270f966af73473203375e1e4491f74a0ff 2 parents 3b022e5 + 8228597
@adoy adoy authored
Showing with 16 additions and 1 deletion.
  1. +0 −1  Zend/zend_highlight.c
  2. +16 −0 ext/standard/tests/strings/bug63874.phpt
View
1  Zend/zend_highlight.c
@@ -186,7 +186,6 @@ ZEND_API void zend_strip(TSRMLS_D)
case T_END_HEREDOC:
zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
- efree(token.value.str.val);
/* read the following character, either newline or ; */
if (lex_scan(&token TSRMLS_CC) != T_WHITESPACE) {
zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
View
16 ext/standard/tests/strings/bug63874.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #63874 (Segfault if php_strip_whitespace has heredoc)
+--FILE--
+<?php
+echo php_strip_whitespace(__FILE__);
+
+return <<<A
+a
+A;
+?>
+--EXPECT--
+<?php
+echo php_strip_whitespace(__FILE__); return <<<A
+a
+A;
+?>
Please sign in to comment.
Something went wrong with that request. Please try again.