derick Sat Feb 14 07:29:06 2004 EDT
Modified files:
/php-src/main php_ini.c
/php-src NEWS
Log:
- Fixed zero bytes memory allocation when no extra ini files are found in the
--with-config-file-scan-dir specified directory. (patch by Eric Colinet
<[EMAIL PROTECTED]>)
http://cvs.php.net/diff.php/php-src/main/php_ini.c?r1=1.125&r2=1.126&ty=u
Index: php-src/main/php_ini.c
diff -u php-src/main/php_ini.c:1.125 php-src/main/php_ini.c:1.126
--- php-src/main/php_ini.c:1.125 Thu Jan 8 03:17:53 2004
+++ php-src/main/php_ini.c Sat Feb 14 07:29:03 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ini.c,v 1.125 2004/01/08 08:17:53 andi Exp $ */
+/* $Id: php_ini.c,v 1.126 2004/02/14 12:29:03 derick Exp $ */
/* Check CWD for php.ini */
#define INI_CHECK_CWD
@@ -512,13 +512,15 @@
* Don't need an extra byte for the \0 in this malloc as the
last
* element will not get a trailing , which gives us the byte
for the \0
*/
- php_ini_scanned_files = (char *) malloc(total_l);
- *php_ini_scanned_files = '\0';
- for (element = scanned_ini_list.head; element; element =
element->next) {
- strcat(php_ini_scanned_files, *(char
**)element->data);
- strcat(php_ini_scanned_files, element->next ? ",\n" :
"\n");
- }
- zend_llist_destroy(&scanned_ini_list);
+ if (total_l) {
+ php_ini_scanned_files = (char *) malloc(total_l);
+ *php_ini_scanned_files = '\0';
+ for (element = scanned_ini_list.head; element; element
= element->next) {
+ strcat(php_ini_scanned_files, *(char
**)element->data);
+ strcat(php_ini_scanned_files, element->next ?
",\n" : "\n");
+ }
+ zend_llist_destroy(&scanned_ini_list);
+ }
}
}
return SUCCESS;
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1607&r2=1.1608&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1607 php-src/NEWS:1.1608
--- php-src/NEWS:1.1607 Thu Feb 12 18:39:45 2004
+++ php-src/NEWS Sat Feb 14 07:29:04 2004
@@ -1,6 +1,8 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2004, PHP 5 Release Candidate 1
+- Fixed zero bytes memory allocation when no extra ini files are found in the
+ --with-config-file-scan-dir specified directory. (Eric Colinet, Derick)
- Fixed start-up problem if both SPL and SimpleXML were enabled. The double
initialization of apache 1.3 was causing problems here. (Marcus, Derick)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php