tony2001 Thu Feb 2 12:20:26 2006 UTC
Modified files:
/php-src/ext/spl spl_directory.c
Log:
MF51: fix #36258 (SplFileObject::getPath() may lead to segfault)
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_directory.c?r1=1.66&r2=1.67&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.66
php-src/ext/spl/spl_directory.c:1.67
--- php-src/ext/spl/spl_directory.c:1.66 Mon Jan 23 15:24:41 2006
+++ php-src/ext/spl/spl_directory.c Thu Feb 2 12:20:26 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_directory.c,v 1.66 2006/01/23 15:24:41 iliaa Exp $ */
+/* $Id: spl_directory.c,v 1.67 2006/02/02 12:20:26 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -340,6 +340,8 @@
spl_filesystem_object_get_file_name(source TSRMLS_CC);
intern->file_name = estrndup(source->file_name,
source->file_name_len);
intern->file_name_len = source->file_name_len;
+ intern->path = estrndup(source->path, source->path_len);
+ intern->path_len = source->path_len;
break;
case SPL_FS_FILE:
return_value->value.obj = spl_filesystem_object_new_ex(ce ? ce
: source->file_class, &intern TSRMLS_CC);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php