]> granicus.if.org Git - php/commitdiff
Fix bug #66660: use str_efree instead of efree to handle interned empty strings correctly
authorFerenc Kovacs <tyrael@php.net>
Sun, 13 Apr 2014 08:45:46 +0000 (10:45 +0200)
committerFerenc Kovacs <tyrael@php.net>
Sun, 13 Apr 2014 08:45:46 +0000 (10:45 +0200)
NEWS
Zend/tests/bug66660.phpt [new file with mode: 0644]
Zend/zend_highlight.c

diff --git a/NEWS b/NEWS
index e98d823861f454cf51ec7476558fc1a1af1fd8f8..cd75dca28fd426e9b750cddb3173be49c0da9cc1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ PHP                                                                        NEWS
     to complete the set; now possible thanks to bug #66015 being fixed. (Bob)
   . Fixed bug #66568 (Update reflection information for unserialize() function).
     (Ferenc)
+  . Fixed bug #66660 (Composer.phar install/update fails). (Ferenc)
 
 - mysqlnd:
   . Added a new fetching mode to mysqlnd. (Andrey)
diff --git a/Zend/tests/bug66660.phpt b/Zend/tests/bug66660.phpt
new file mode 100644 (file)
index 0000000..9ae8a27
--- /dev/null
@@ -0,0 +1,13 @@
+--TEST--
+Bug #66660 (Composer.phar install/update fails)
+--STDIN--
+<?php __CLASS__ ?>
+--FILE--
+<?php
+file_put_contents(__DIR__."/bug66660.tmp.php", "<?php __CLASS__ ?>");
+echo php_strip_whitespace(__DIR__."/bug66660.tmp.php");
+?>
+--CLEAN--
+<?php unlink(__DIR__."/bug66660.tmp.php"); ?>
+--EXPECT--
+<?php __CLASS__ ?>
index e4f8d0237a10b2eae02e33f2c07ee125143da7da..68f2b7b72dcd98a74b1b1267b3be2c760cf2a2de 100644 (file)
@@ -211,7 +211,7 @@ ZEND_API void zend_strip(TSRMLS_D)
                                        break;
 
                                default:
-                                       efree(token.value.str.val);
+                                       STR_FREE(token.value.str.val);
                                        break;
                        }
                }