iliaa Thu Jun 14 23:28:06 2007 UTC
Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/file bug41693.phpt
Modified files:
/php-src NEWS
/php-src/ext/standard dir.c
Log:
Fixed bug #41693 (scandir() allows empty directory names).
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.780&r2=1.2027.2.547.2.781&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.780 php-src/NEWS:1.2027.2.547.2.781
--- php-src/NEWS:1.2027.2.547.2.780 Thu Jun 14 19:17:30 2007
+++ php-src/NEWS Thu Jun 14 23:28:05 2007
@@ -92,6 +92,7 @@
- Fixed altering $this via argument named "this". (Dmitry)
- Fixed PHP CLI usage of php.ini from the binary location. (Hannes)
- Fixed segfault in strripos(). (Tony, Joxean Koret)
+- Fixed bug #41693 (scandir() allows empty directory names). (Ilia)
- Fixed bug #41673 (json_encode breaks large numbers in arrays). (Ilia)
- Fixed bug #41525 (ReflectionParameter::getPosition() not available). (Marcus)
- Fixed bug #41511 (Compile failure under IRIX 6.5.30 building md5.c). (Jani)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.147.2.3.2.6&r2=1.147.2.3.2.7&diff_format=u
Index: php-src/ext/standard/dir.c
diff -u php-src/ext/standard/dir.c:1.147.2.3.2.6
php-src/ext/standard/dir.c:1.147.2.3.2.7
--- php-src/ext/standard/dir.c:1.147.2.3.2.6 Tue Jun 12 13:42:32 2007
+++ php-src/ext/standard/dir.c Thu Jun 14 23:28:06 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dir.c,v 1.147.2.3.2.6 2007/06/12 13:42:32 scottmac Exp $ */
+/* $Id: dir.c,v 1.147.2.3.2.7 2007/06/14 23:28:06 iliaa Exp $ */
/* {{{ includes/startup/misc */
@@ -482,6 +482,11 @@
return;
}
+ if (dirn_len < 1) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Directory name
cannot be empty");
+ RETURN_FALSE;
+ }
+
if (zcontext) {
context = php_stream_context_from_zval(zcontext, 0);
}
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug41693.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/bug41693.phpt
+++ php-src/ext/standard/tests/file/bug41693.phpt
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php