cvs: php4(PHP_4_3) /ext/standard basic_functions.c browscap.c /main main.c php_ini.c
| From: | Sascha Schumann | Date: | Sat, 17 May 2003 07:55:18 +0000 |
| Subject: | cvs: php4(PHP_4_3) /ext/standard basic_functions.c browscap.c /main main.c php_ini.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-20985@lists.php.net to get a copy of this message | ||
sas Sat May 17 03:55:18 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/standard basic_functions.c browscap.c
/php4/main main.c php_ini.c
Log:
Initialize all zend_file_handle instances properly
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.543.2.14
php4/ext/standard/basic_functions.c:1.543.2.15
--- php4/ext/standard/basic_functions.c:1.543.2.14 Thu May 15 21:09:10 2003
+++ php4/ext/standard/basic_functions.c Sat May 17 03:55:17 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.543.2.14 2003/05/16 01:09:10 iliaa Exp $ */
+/* $Id: basic_functions.c,v 1.543.2.15 2003/05/17 07:55:17 sas Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -2839,7 +2839,7 @@
PHP_FUNCTION(parse_ini_file)
{
zval **filename, **process_sections;
- zend_file_handle fh;
+ zend_file_handle fh = {0};
zend_ini_parser_cb_t ini_parser_cb;
switch (ARG_COUNT(ht)) {
Index: php4/ext/standard/browscap.c
diff -u php4/ext/standard/browscap.c:1.60.2.8 php4/ext/standard/browscap.c:1.60.2.9
--- php4/ext/standard/browscap.c:1.60.2.8 Fri May 16 11:13:57 2003
+++ php4/ext/standard/browscap.c Sat May 17 03:55:18 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: browscap.c,v 1.60.2.8 2003/05/16 15:13:57 iliaa Exp $ */
+/* $Id: browscap.c,v 1.60.2.9 2003/05/17 07:55:18 sas Exp $ */
#include "php.h"
#include "php_regex.h"
@@ -150,7 +150,7 @@
char *browscap = INI_STR("browscap");
if (browscap) {
- zend_file_handle fh;
+ zend_file_handle fh = {0};
if (zend_hash_init(&browser_hash, 0, NULL, (dtor_func_t) browscap_entry_dtor, 1)==FAILURE) {
return FAILURE;
Index: php4/main/main.c
diff -u php4/main/main.c:1.512.2.34 php4/main/main.c:1.512.2.35
--- php4/main/main.c:1.512.2.34 Fri May 16 16:33:18 2003
+++ php4/main/main.c Sat May 17 03:55:18 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.512.2.34 2003/05/16 20:33:18 fujimoto Exp $ */
+/* $Id: main.c,v 1.512.2.35 2003/05/17 07:55:18 sas Exp $ */
/* {{{ includes
*/
@@ -1600,7 +1600,7 @@
PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC)
{
zend_file_handle *prepend_file_p, *append_file_p;
- zend_file_handle prepend_file, append_file;
+ zend_file_handle prepend_file = {0}, append_file = {0};
#if HAVE_BROKEN_GETCWD
int old_cwd_fd = -1;
#else
Index: php4/main/php_ini.c
diff -u php4/main/php_ini.c:1.106.2.9 php4/main/php_ini.c:1.106.2.10
--- php4/main/php_ini.c:1.106.2.9 Wed Apr 9 16:27:55 2003
+++ php4/main/php_ini.c Sat May 17 03:55:18 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ini.c,v 1.106.2.9 2003/04/09 20:27:55 helly Exp $ */
+/* $Id: php_ini.c,v 1.106.2.10 2003/05/17 07:55:18 sas Exp $ */
/* Check CWD for php.ini */
#define INI_CHECK_CWD
@@ -236,7 +236,7 @@
int safe_mode_state;
char *open_basedir;
int free_ini_search_path=0;
- zend_file_handle fh;
+ zend_file_handle fh = {0};
struct stat sb;
char ini_file[MAXPATHLEN];
char *p;
@@ -347,7 +347,6 @@
PG(safe_mode) = 0;
PG(open_basedir) = NULL;
- memset(&fh, 0, sizeof(fh));
/* Check if php_ini_path_override is a file */
if (!sapi_module.php_ini_ignore) {
if (sapi_module.php_ini_path_override && sapi_module.php_ini_path_override[0]) {