lbarnaud Thu Sep 11 15:24:13 2008 UTC
Added files: (Branch: PHP_5_2)
/php-src/ext/spl/tests bug46051.phpt
Modified files:
/php-src NEWS
/php-src/ext/spl spl_directory.c
Log:
MFH: Fixed #46051 (SplFileInfo::openFile - memory overlap)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1223&r2=1.2027.2.547.2.1224&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1223 php-src/NEWS:1.2027.2.547.2.1224
--- php-src/NEWS:1.2027.2.547.2.1223 Thu Sep 11 14:24:28 2008
+++ php-src/NEWS Thu Sep 11 15:24:11 2008
@@ -18,6 +18,7 @@
(Scott)
- Fixed a crash on invalid method in ReflectionParameter constructor.
(Christian Seiler)
+- Fixed bug #46051 (SplFileInfo::openFile - memory overlap). (Arnaud)
- Fixed bug #46047 (SimpleXML converts empty nodes into object with nested
array). (Rob)
- Fixed bug #46031 (Segfault in AppendIterator::next). (Arnaud)
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.27&r2=1.45.2.27.2.28&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.27
php-src/ext/spl/spl_directory.c:1.45.2.27.2.28
--- php-src/ext/spl/spl_directory.c:1.45.2.27.2.27 Sat May 3 16:00:40 2008
+++ php-src/ext/spl/spl_directory.c Thu Sep 11 15:24:12 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_directory.c,v 1.45.2.27.2.27 2008/05/03 16:00:40 colder Exp $ */
+/* $Id: spl_directory.c,v 1.45.2.27.2.28 2008/09/11 15:24:12 lbarnaud Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -426,6 +426,7 @@
&use_include_path,
&intern->u.file.zcontext) == FAILURE) {
php_set_error_handling(EH_NORMAL, NULL
TSRMLS_CC);
intern->u.file.open_mode = NULL;
+ intern->file_name = NULL;
zval_dtor(return_value);
Z_TYPE_P(return_value) = IS_NULL;
return NULL;
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug46051.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/bug46051.phpt
+++ php-src/ext/spl/tests/bug46051.phpt
--TEST--
Bug #46051 (SplFileInfo::openFile - memory overlap)
--FILE--
<?php
$x = new splfileinfo(__FILE__);
try {
$x->openFile(NULL, NULL, NULL);
} catch (Exception $e) { }
var_dump($x->getPathName());
--EXPECTF--
%unicode|string%(%d) "%sbug46051.php"
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php