Re: [PHP-CVS] cvs: php4(PHP_4_3) /ext/standard dir.c
Try remember to mention the bug report number in your commit messages, and use same message in the HEAD commit too: - Fixed bug #12345 (foobar). (Hartmut) This you can easily then copy'paste to NEWS too. (hint!) AND NO C++ COMMENTS /cvs-cop-mode --jani On Tue, 3 Jun 2003, Hartmut Holzgraefe wrote: hholzgra Tue Jun 3 07:07:40 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard dir.c Log: MFH Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.109.2.5 php4/ext/standard/dir.c:1.109.2.6 --- php4/ext/standard/dir.c:1.109.2.5 Mon May 5 08:17:02 2003 +++ php4/ext/standard/dir.cTue Jun 3 07:07:40 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.109.2.5 2003/05/05 12:17:02 thies Exp $ */ +/* $Id: dir.c,v 1.109.2.6 2003/06/03 11:07:40 hholzgra Exp $ */ /* {{{ includes/startup/misc */ @@ -398,11 +398,16 @@ RETURN_FALSE; } +#ifndef GLOB_NOMATCH + // now catch the FreeBSD style of no matches + if (!globbuf.gl_pathc) { + array_init(return_value); + return; + } +#endif + /* we assume that any glob pattern will match files from one directory only so checking the dirname of the first match should be sufficient */ - if (!globbuf.gl_pathv) { - RETURN_FALSE; - } strncpy(cwd, globbuf.gl_pathv[0], MAXPATHLEN); if (PG(safe_mode) (!php_checkuid(cwd, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { RETURN_FALSE; -- https://www.paypal.com/xclick/[EMAIL PROTECTED]no_note=1tax=0currency_code=EUR -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard dir.c
hholzgraTue Jun 3 07:07:40 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard dir.c Log: MFH Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.109.2.5 php4/ext/standard/dir.c:1.109.2.6 --- php4/ext/standard/dir.c:1.109.2.5 Mon May 5 08:17:02 2003 +++ php4/ext/standard/dir.c Tue Jun 3 07:07:40 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.109.2.5 2003/05/05 12:17:02 thies Exp $ */ +/* $Id: dir.c,v 1.109.2.6 2003/06/03 11:07:40 hholzgra Exp $ */ /* {{{ includes/startup/misc */ @@ -398,11 +398,16 @@ RETURN_FALSE; } +#ifndef GLOB_NOMATCH + // now catch the FreeBSD style of no matches + if (!globbuf.gl_pathc) { + array_init(return_value); + return; + } +#endif + /* we assume that any glob pattern will match files from one directory only so checking the dirname of the first match should be sufficient */ - if (!globbuf.gl_pathv) { - RETURN_FALSE; - } strncpy(cwd, globbuf.gl_pathv[0], MAXPATHLEN); if (PG(safe_mode) (!php_checkuid(cwd, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { RETURN_FALSE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard dir.c
msopacuaTue Dec 24 10:04:10 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard dir.c Log: MFH: crash fix in glob() with no results Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.109.2.1 php4/ext/standard/dir.c:1.109.2.2 --- php4/ext/standard/dir.c:1.109.2.1 Thu Nov 14 17:51:21 2002 +++ php4/ext/standard/dir.c Tue Dec 24 10:04:10 2002 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.109.2.1 2002/11/14 22:51:21 ssb Exp $ */ +/* $Id: dir.c,v 1.109.2.2 2002/12/24 15:04:10 msopacua Exp $ */ /* {{{ includes/startup/misc */ @@ -400,6 +400,9 @@ /* we assume that any glob pattern will match files from one directory only so checking the dirname of the first match should be sufficient */ + if (!globbuf.gl_pathv) { + RETURN_FALSE; + } strncpy(cwd, globbuf.gl_pathv[0], MAXPATHLEN); if (PG(safe_mode) (!php_checkuid(cwd, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { RETURN_FALSE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard dir.c
ssb Thu Nov 14 17:51:22 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard dir.c Log: MFH Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.109 php4/ext/standard/dir.c:1.109.2.1 --- php4/ext/standard/dir.c:1.109 Wed Nov 13 08:31:33 2002 +++ php4/ext/standard/dir.c Thu Nov 14 17:51:21 2002 -16,7 +16,7 +--+ */ -/* $Id: dir.c,v 1.109 2002/11/13 13:31:33 john Exp $ */ +/* $Id: dir.c,v 1.109.2.1 2002/11/14 22:51:21 ssb Exp $ */ /* {{{ includes/startup/misc */ -119,7 +119,7 PHP_MINIT_FUNCTION(dir) { - static char tmpstr[2]; + static char dirsep_str[2], pathsep_str[2]; zend_class_entry dir_class_entry; INIT_CLASS_ENTRY(dir_class_entry, Directory, php_dir_class_functions); -128,9 +128,12 #ifdef ZTS ts_allocate_id(dir_globals_id, sizeof(php_dir_globals), NULL, NULL); #endif - tmpstr[0] = DEFAULT_SLASH; - tmpstr[1] = '\0'; - REGISTER_STRING_CONSTANT(DIRECTORY_SEPARATOR, tmpstr, CONST_CS|CONST_PERSISTENT); + dirsep_str[0] = DEFAULT_SLASH; + dirsep_str[1] = '\0'; + REGISTER_STRING_CONSTANT(DIRECTORY_SEPARATOR, dirsep_str, +CONST_CS|CONST_PERSISTENT); +pathsep_str[0] = ZEND_PATHS_SEPARATOR; +pathsep_str[1] = '\0'; + REGISTER_STRING_CONSTANT(PATH_SEPARATOR, pathsep_str, +CONST_CS|CONST_PERSISTENT); #ifdef HAVE_GLOB #ifdef GLOB_BRACE -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php