lbarnaud Tue Oct 21 23:36:18 2008 UTC
Modified files:
/php-src/ext/curl interface.c
/php-src/ext/date php_date.c
/php-src/ext/dom domimplementation.c
/php-src/ext/exif exif.c
/php-src/ext/gd gd.c
/php-src/ext/openssl openssl.c
/php-src/ext/simplexml simplexml.c
/php-src/ext/soap soap.c
/php-src/ext/sockets sockets.c
/php-src/ext/zip php_zip.c
Log:
initialize optional vars
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.125&r2=1.126&diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.125 php-src/ext/curl/interface.c:1.126
--- php-src/ext/curl/interface.c:1.125 Tue Jul 29 10:42:15 2008
+++ php-src/ext/curl/interface.c Tue Oct 21 23:36:16 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interface.c,v 1.125 2008/07/29 10:42:15 tony2001 Exp $ */
+/* $Id: interface.c,v 1.126 2008/10/21 23:36:16 lbarnaud Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -1092,8 +1092,8 @@
php_curl *ch;
CURL *cp;
zstr src = NULL_ZSTR;
- int src_len;
- zend_uchar src_type;
+ int src_len = 0;
+ zend_uchar src_type = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|t", &src,
&src_len, &src_type) == FAILURE) {
RETURN_FALSE;
@@ -1783,7 +1783,7 @@
{
zval *zid;
php_curl *ch;
- long option;
+ long option = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|l", &zid,
&option) == FAILURE) {
RETURN_FALSE;
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.206&r2=1.207&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.206 php-src/ext/date/php_date.c:1.207
--- php-src/ext/date/php_date.c:1.206 Sat Aug 9 21:58:40 2008
+++ php-src/ext/date/php_date.c Tue Oct 21 23:36:17 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_date.c,v 1.206 2008/08/09 21:58:40 tony2001 Exp $ */
+/* $Id: php_date.c,v 1.207 2008/10/21 23:36:17 lbarnaud Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -1511,7 +1511,7 @@
{
char *format;
int format_len;
- long ts;
+ long ts = 0;
int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &format,
&format_len, &ts) == FAILURE) {
@@ -1574,7 +1574,7 @@
char *times, *initial_ts;
int time_len, error1, error2;
struct timelib_error_container *error;
- long preset_ts, ts;
+ long preset_ts = 0, ts;
timelib_time *t, *now;
timelib_tzinfo *tzi;
@@ -1631,7 +1631,7 @@
/* {{{ php_mktime - (gm)mktime helper */
PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
{
- long hou, min, sec, mon, day, yea, dst = -1;
+ long hou = 0, min = 0, sec = 0, mon = 0, day = 0, yea = 0, dst = -1;
timelib_time *now;
timelib_tzinfo *tzi = NULL;
long ts, adjust_seconds = 0;
@@ -1760,7 +1760,7 @@
{
char *format, *buf;
int format_len;
- long timestamp;
+ long timestamp = 0;
struct tm ta;
int max_reallocs = 5;
size_t buf_len = 64, real_len;
@@ -3962,7 +3962,7 @@
const timelib_tzdb_index_entry *table;
int i, item_count;
long what = PHP_DATE_TIMEZONE_GROUP_ALL;
- char *option;
+ char *option = NULL;
int option_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ls", &what,
&option, &option_len) == FAILURE) {
@@ -4068,10 +4068,10 @@
*/
static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int
calc_sunset)
{
- double latitude, longitude, zenith, gmt_offset = 0, altitude;
+ double latitude = 0.0, longitude = 0.0, zenith = 0.0, gmt_offset = 0,
altitude;
double h_rise, h_set, N;
timelib_sll rise, set, transit;
- long time, retformat;
+ long time, retformat = 0;
int rs;
timelib_time *t;
timelib_tzinfo *tzi;
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/domimplementation.c?r1=1.27&r2=1.28&diff_format=u
Index: php-src/ext/dom/domimplementation.c
diff -u php-src/ext/dom/domimplementation.c:1.27
php-src/ext/dom/domimplementation.c:1.28
--- php-src/ext/dom/domimplementation.c:1.27 Thu Aug 14 08:38:37 2008
+++ php-src/ext/dom/domimplementation.c Tue Oct 21 23:36:17 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domimplementation.c,v 1.27 2008/08/14 08:38:37 tony2001 Exp $ */
+/* $Id: domimplementation.c,v 1.28 2008/10/21 23:36:17 lbarnaud Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -98,7 +98,7 @@
zval *rv = NULL;
xmlDtd *doctype;
int ret, name_len = 0, publicid_len = 0, systemid_len = 0;
- char *name, *publicid, *systemid;
+ char *name = NULL, *publicid = NULL, *systemid = NULL;
xmlChar *pch1 = NULL, *pch2 = NULL, *localname = NULL;
xmlURIPtr uri;
@@ -161,7 +161,7 @@
xmlDtdPtr doctype = NULL;
xmlNsPtr nsptr = NULL;
int ret, uri_len = 0, name_len = 0, errorcode = 0;
- char *uri, *name;
+ char *uri = NULL, *name = NULL;
char *prefix = NULL, *localname = NULL;
dom_object *doctobj;
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.204&r2=1.205&diff_format=u
Index: php-src/ext/exif/exif.c
diff -u php-src/ext/exif/exif.c:1.204 php-src/ext/exif/exif.c:1.205
--- php-src/ext/exif/exif.c:1.204 Sun Aug 3 12:10:51 2008
+++ php-src/ext/exif/exif.c Tue Oct 21 23:36:17 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: exif.c,v 1.204 2008/08/03 12:10:51 jani Exp $ */
+/* $Id: exif.c,v 1.205 2008/10/21 23:36:17 lbarnaud Exp $ */
/* ToDos
*
@@ -142,7 +142,7 @@
};
/* }}} */
-#define EXIF_VERSION "1.4 $Id: exif.c,v 1.204 2008/08/03 12:10:51 jani Exp $"
+#define EXIF_VERSION "1.4 $Id: exif.c,v 1.205 2008/10/21 23:36:17 lbarnaud Exp
$"
/* {{{ PHP_MINFO_FUNCTION
*/
@@ -3892,7 +3892,7 @@
image_info_type ImageInfo;
char tmp[64], *sections_str=0, *s;
char *filename;
- int filename_len, sections_str_len;
+ int filename_len, sections_str_len = 0;
memset(&ImageInfo, 0, sizeof(ImageInfo));
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.394&r2=1.395&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.394 php-src/ext/gd/gd.c:1.395
--- php-src/ext/gd/gd.c:1.394 Mon Sep 22 15:30:59 2008
+++ php-src/ext/gd/gd.c Tue Oct 21 23:36:17 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.394 2008/09/22 15:30:59 rrichards Exp $ */
+/* $Id: gd.c,v 1.395 2008/10/21 23:36:17 lbarnaud Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -4144,7 +4144,7 @@
PHP_FUNCTION(imagepsbbox)
{
zval *fnt;
- long sz = 0, sp, wd;
+ long sz = 0, sp = 0, wd = 0;
char *str;
int i, space = 0, add_width = 0, char_width, amount_kern;
int cur_x, cur_y, dx, dy;
@@ -4152,7 +4152,7 @@
int *f_ind;
int str_len, per_char = 0;
int argc = ZEND_NUM_ARGS();
- double angle, sin_a = 0, cos_a = 0;
+ double angle = 0, sin_a = 0, cos_a = 0;
BBox char_bbox, str_bbox = {0, 0, 0, 0};
if (argc != 3 && argc != 6) {
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.170&r2=1.171&diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.170 php-src/ext/openssl/openssl.c:1.171
--- php-src/ext/openssl/openssl.c:1.170 Tue Oct 14 23:39:02 2008
+++ php-src/ext/openssl/openssl.c Tue Oct 21 23:36:17 2008
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: openssl.c,v 1.170 2008/10/14 23:39:02 iliaa Exp $ */
+/* $Id: openssl.c,v 1.171 2008/10/21 23:36:17 lbarnaud Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1550,7 +1550,7 @@
long purpose;
zval **ppuntrusted=NULL;
char * untrusted = NULL;
- int untrusted_len;
+ int untrusted_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zl|a!Z", &zcert,
&purpose, &zcainfo, &ppuntrusted) == FAILURE) {
return;
@@ -3279,7 +3279,7 @@
zval **cert;
EVP_PKEY *pkey;
char *passphrase = "";
- int passphrase_len;
+ int passphrase_len = sizeof("")-1;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|s&", &cert,
&passphrase, &passphrase_len, UG(ascii_conv)) == FAILURE) {
return;
@@ -3413,11 +3413,11 @@
zval **ppfilename;
char * filename; int filename_len;
zval **ppextracerts=NULL;
- char * extracerts = NULL; int extracerts_len;
+ char * extracerts = NULL; int extracerts_len = 0;
zval **ppsignersfilename;
- char * signersfilename = NULL; int signersfilename_len;
+ char * signersfilename = NULL; int signersfilename_len = 0;
zval **ppdatafilename=NULL;
- char * datafilename = NULL; int datafilename_len;
+ char * datafilename = NULL; int datafilename_len = 0;
RETVAL_LONG(-1);
@@ -4339,7 +4339,7 @@
unsigned char *buf = NULL, **eks;
char *data; int data_len;
char *method =NULL;
- int method_len;
+ int method_len = 0;
const EVP_CIPHER *cipher;
EVP_CIPHER_CTX ctx;
@@ -4465,7 +4465,7 @@
char * data; int data_len;
char * ekey; int ekey_len;
char *method =NULL;
- int method_len;
+ int method_len = 0;
const EVP_CIPHER *cipher;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SzSZ|s&", &data,
&data_len, &opendata, &ekey, &ekey_len, &privkey, &method, &method_len,
UG(ascii_conv)) == FAILURE) {
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.263&r2=1.264&diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.263
php-src/ext/simplexml/simplexml.c:1.264
--- php-src/ext/simplexml/simplexml.c:1.263 Mon Oct 20 19:28:36 2008
+++ php-src/ext/simplexml/simplexml.c Tue Oct 21 23:36:17 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: simplexml.c,v 1.263 2008/10/20 19:28:36 rrichards Exp $ */
+/* $Id: simplexml.c,v 1.264 2008/10/21 23:36:17 lbarnaud Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1546,7 +1546,7 @@
{
php_sxe_object *sxe;
char *nsprefix = NULL;
- int nsprefix_len;
+ int nsprefix_len = 0;
xmlNodePtr node;
zend_bool isprefix = 0;
@@ -1595,7 +1595,7 @@
{
php_sxe_object *sxe;
char *nsprefix = NULL;
- int nsprefix_len;
+ int nsprefix_len = 0;
xmlNodePtr node;
zend_bool isprefix = 0;
@@ -2644,7 +2644,7 @@
{
php_info_print_table_start();
php_info_print_table_header(2, "Simplexml support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.263 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.264 $");
php_info_print_table_row(2, "Schema support",
#ifdef LIBXML_SCHEMAS_ENABLED
"enabled");
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/soap.c?r1=1.251&r2=1.252&diff_format=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.251 php-src/ext/soap/soap.c:1.252
--- php-src/ext/soap/soap.c:1.251 Mon Sep 15 18:04:18 2008
+++ php-src/ext/soap/soap.c Tue Oct 21 23:36:17 2008
@@ -17,7 +17,7 @@
| Dmitry Stogov <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: soap.c,v 1.251 2008/09/15 18:04:18 felipe Exp $ */
+/* $Id: soap.c,v 1.252 2008/10/21 23:36:17 lbarnaud Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1211,9 +1211,9 @@
zstr fault_actor = NULL_ZSTR;
zstr name = NULL_ZSTR;
char *fault_code = NULL, *fault_code_ns = NULL;
- int fault_string_len, fault_actor_len, name_len;
+ int fault_string_len = 0, fault_actor_len = 0, name_len = 0;
zval *code = NULL, *details = NULL, *headerfault = NULL;
- zend_uchar name_type, fault_string_type, fault_actor_type;
+ zend_uchar name_type = 0, fault_string_type = 0, fault_actor_type = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zt|t!z!t!z",
&code,
@@ -1342,8 +1342,8 @@
{
zval *data, *type;
zstr stype = NULL_ZSTR, ns = NULL_ZSTR, name = NULL_ZSTR, namens =
NULL_ZSTR;
- int stype_len, ns_len, name_len, namens_len;
- zend_uchar stype_type, ns_type, name_type, namens_type;
+ int stype_len = 0, ns_len = 0, name_len = 0, namens_len = 0;
+ zend_uchar stype_type = 0, ns_type = 0, name_type = 0, namens_type = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z!z|tttt",
&data, &type,
@@ -1940,7 +1940,7 @@
soapHeader *soap_headers = NULL;
sdlFunctionPtr function;
zstr arg = NULL_ZSTR;
- int arg_len;
+ int arg_len = 0;
xmlCharEncodingHandlerPtr old_encoding;
HashTable *old_class_map, *old_typemap;
int old_features;
@@ -2478,8 +2478,8 @@
zstr code, string;
zstr actor=NULL_ZSTR;
zstr name=NULL_ZSTR;
- int code_len, string_len, actor_len, name_len;
- zend_uchar code_type, string_type, actor_type, name_type;
+ int code_len, string_len, actor_len = 0, name_len = 0;
+ zend_uchar code_type, string_type, actor_type = 0, name_type = 0;
zval* details = NULL;
SOAP_SERVER_BEGIN_CODE();
@@ -3695,8 +3695,8 @@
{
zstr name;
zstr val = NULL_ZSTR;
- int name_len, val_len;
- zend_uchar name_type, val_type;
+ int name_len, val_len = 0;
+ zend_uchar name_type, val_type = 0;
soap_client_object *client;
client = (soap_client_object*)zend_object_store_get_object(this_ptr
TSRMLS_CC);
@@ -3796,8 +3796,8 @@
PHP_METHOD(SoapClient, __setLocation)
{
void* location = NULL;
- int location_len;
- zend_uchar location_type;
+ int location_len = 0;
+ zend_uchar location_type = 0;
soap_client_object *client;
client = (soap_client_object*)zend_object_store_get_object(this_ptr
TSRMLS_CC);
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.200&r2=1.201&diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.200 php-src/ext/sockets/sockets.c:1.201
--- php-src/ext/sockets/sockets.c:1.200 Thu Aug 21 23:37:39 2008
+++ php-src/ext/sockets/sockets.c Tue Oct 21 23:36:17 2008
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sockets.c,v 1.200 2008/08/21 23:37:39 pajoye Exp $ */
+/* $Id: sockets.c,v 1.201 2008/10/21 23:36:17 lbarnaud Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -976,7 +976,7 @@
zval *arg1;
php_socket *php_sock;
int retval, str_len;
- long length;
+ long length = 0;
char *str;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &arg1,
&str, &str_len, &length) == FAILURE) {
@@ -1270,7 +1270,7 @@
struct sockaddr_un s_un;
char *addr;
int retval, addr_len;
- long port;
+ long port = 0;
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc TSRMLS_CC, "rs|l", &arg1, &addr,
&addr_len, &port) == FAILURE) {
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.61&r2=1.62&diff_format=u
Index: php-src/ext/zip/php_zip.c
diff -u php-src/ext/zip/php_zip.c:1.61 php-src/ext/zip/php_zip.c:1.62
--- php-src/ext/zip/php_zip.c:1.61 Fri Aug 15 19:57:24 2008
+++ php-src/ext/zip/php_zip.c Tue Oct 21 23:36:17 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_zip.c,v 1.61 2008/08/15 19:57:24 felipe Exp $ */
+/* $Id: php_zip.c,v 1.62 2008/10/21 23:36:17 lbarnaud Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1143,8 +1143,8 @@
{
zval * zip;
zval * zip_entry;
- char *mode;
- int mode_len;
+ char *mode = NULL;
+ int mode_len = 0;
zip_read_rsrc * zr_rsrc;
zip_rsrc *z_rsrc;
@@ -1486,10 +1486,10 @@
struct zip *intern;
zval *this = getThis();
char *pattern;
- char *path;
+ char *path = NULL;
char *remove_path = NULL;
char *add_path = NULL;
- int pattern_len, add_path_len, remove_path_len, path_len;
+ int pattern_len, add_path_len, remove_path_len, path_len = 0;
long remove_all_path = 0;
long flags = 0;
zval *options = NULL;
@@ -2643,7 +2643,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "Zip", "enabled");
- php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.61
2008/08/15 19:57:24 felipe Exp $");
+ php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 1.62
2008/10/21 23:36:17 lbarnaud Exp $");
php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION_STRING);
php_info_print_table_row(2, "Libzip version", "0.9.0");
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php