Modified: php/php-src/branches/PHP_5_3/ext/phar/phar.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/phar/phar.c 2011-08-07 10:33:58 UTC (rev 314418) +++ php/php-src/branches/PHP_5_3/ext/phar/phar.c 2011-08-07 11:13:27 UTC (rev 314419) @@ -667,7 +667,7 @@ php_uint32 manifest_len, manifest_count, manifest_flags, manifest_index, tmp_len, sig_flags; php_uint16 manifest_ver; long offset; - int register_alias, sig_len, temp_alias = 0; + int sig_len, register_alias = 0, temp_alias = 0; char *signature = NULL; if (pphar) { @@ -3393,6 +3393,7 @@ res = phar_orig_compile_file(file_handle, type TSRMLS_CC); } zend_catch { failed = 1; + res = NULL; } zend_end_try(); if (name) { Modified: php/php-src/branches/PHP_5_3/ext/phar/phar_object.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/phar/phar_object.c 2011-08-07 10:33:58 UTC (rev 314418) +++ php/php-src/branches/PHP_5_3/ext/phar/phar_object.c 2011-08-07 11:13:27 UTC (rev 314419) @@ -661,7 +661,7 @@ char *fname, *basename, *path_info, *mime_type = NULL, *entry, *pt; int fname_len, entry_len, code, index_php_len = 0, not_cgi; phar_archive_data *phar = NULL; - phar_entry_info *info; + phar_entry_info *info = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!s!saz", &alias, &alias_len, &index_php, &index_php_len, &f404, &f404_len, &mimeoverride, &rewrite) == FAILURE) { return; @@ -888,7 +888,7 @@ zend_bailout(); } else { - char *tmp, sa; + char *tmp = NULL, sa = '\0'; sapi_header_line ctr = {0}; ctr.response_code = 301; ctr.line_len = sizeof("HTTP/1.1 301 Moved Permanently")+1; Modified: php/php-src/branches/PHP_5_3/ext/phar/stream.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/phar/stream.c 2011-08-07 10:33:58 UTC (rev 314418) +++ php/php-src/branches/PHP_5_3/ext/phar/stream.c 2011-08-07 11:13:27 UTC (rev 314419) @@ -421,6 +421,8 @@ case SEEK_SET : temp = data->zero + offset; break; + default : + temp = 0; } if (temp > data->zero + (off_t) entry->uncompressed_filesize) { *newoffset = -1; Modified: php/php-src/branches/PHP_5_3/ext/phar/util.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/phar/util.c 2011-08-07 10:33:58 UTC (rev 314418) +++ php/php-src/branches/PHP_5_3/ext/phar/util.c 2011-08-07 11:13:27 UTC (rev 314419) @@ -154,6 +154,9 @@ case SEEK_SET: temp = eoffset + offset; break; + default: + temp = 0; + break; } if (temp > eoffset + (off_t) entry->uncompressed_filesize) { @@ -1203,7 +1206,7 @@ phar_archive_data *fd, **fd_ptr; char *my_realpath, *save; int save_len; - ulong fhash, ahash; + ulong fhash, ahash = 0; phar_request_initialize(TSRMLS_C); Modified: php/php-src/branches/PHP_5_4/ext/phar/phar.c =================================================================== --- php/php-src/branches/PHP_5_4/ext/phar/phar.c 2011-08-07 10:33:58 UTC (rev 314418) +++ php/php-src/branches/PHP_5_4/ext/phar/phar.c 2011-08-07 11:13:27 UTC (rev 314419) @@ -667,7 +667,7 @@ php_uint32 manifest_len, manifest_count, manifest_flags, manifest_index, tmp_len, sig_flags; php_uint16 manifest_ver; long offset; - int register_alias, sig_len, temp_alias = 0; + int sig_len, register_alias = 0, temp_alias = 0; char *signature = NULL; if (pphar) { @@ -3391,6 +3391,7 @@ res = phar_orig_compile_file(file_handle, type TSRMLS_CC); } zend_catch { failed = 1; + res = NULL; } zend_end_try(); if (name) { Modified: php/php-src/branches/PHP_5_4/ext/phar/phar_object.c =================================================================== --- php/php-src/branches/PHP_5_4/ext/phar/phar_object.c 2011-08-07 10:33:58 UTC (rev 314418) +++ php/php-src/branches/PHP_5_4/ext/phar/phar_object.c 2011-08-07 11:13:27 UTC (rev 314419) @@ -663,7 +663,7 @@ const char *basename; int fname_len, entry_len, code, index_php_len = 0, not_cgi; phar_archive_data *phar = NULL; - phar_entry_info *info; + phar_entry_info *info = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!s!saz", &alias, &alias_len, &index_php, &index_php_len, &f404, &f404_len, &mimeoverride, &rewrite) == FAILURE) { return; @@ -890,7 +890,7 @@ zend_bailout(); } else { - char *tmp, sa; + char *tmp = NULL, sa = '\0'; sapi_header_line ctr = {0}; ctr.response_code = 301; ctr.line_len = sizeof("HTTP/1.1 301 Moved Permanently")+1; Modified: php/php-src/branches/PHP_5_4/ext/phar/stream.c =================================================================== --- php/php-src/branches/PHP_5_4/ext/phar/stream.c 2011-08-07 10:33:58 UTC (rev 314418) +++ php/php-src/branches/PHP_5_4/ext/phar/stream.c 2011-08-07 11:13:27 UTC (rev 314419) @@ -421,6 +421,8 @@ case SEEK_SET : temp = data->zero + offset; break; + default: + temp = 0; } if (temp > data->zero + (off_t) entry->uncompressed_filesize) { *newoffset = -1; Modified: php/php-src/branches/PHP_5_4/ext/phar/util.c =================================================================== --- php/php-src/branches/PHP_5_4/ext/phar/util.c 2011-08-07 10:33:58 UTC (rev 314418) +++ php/php-src/branches/PHP_5_4/ext/phar/util.c 2011-08-07 11:13:27 UTC (rev 314419) @@ -154,6 +154,8 @@ case SEEK_SET: temp = eoffset + offset; break; + default: + temp = 0; } if (temp > eoffset + (off_t) entry->uncompressed_filesize) { @@ -1203,7 +1205,7 @@ phar_archive_data *fd, **fd_ptr; char *my_realpath, *save; int save_len; - ulong fhash, ahash; + ulong fhash, ahash = 0; phar_request_initialize(TSRMLS_C); Modified: php/php-src/trunk/ext/phar/phar.c =================================================================== --- php/php-src/trunk/ext/phar/phar.c 2011-08-07 10:33:58 UTC (rev 314418) +++ php/php-src/trunk/ext/phar/phar.c 2011-08-07 11:13:27 UTC (rev 314419) @@ -667,7 +667,7 @@ php_uint32 manifest_len, manifest_count, manifest_flags, manifest_index, tmp_len, sig_flags; php_uint16 manifest_ver; long offset; - int register_alias, sig_len, temp_alias = 0; + int sig_len, register_alias = 0, temp_alias = 0; char *signature = NULL; if (pphar) { @@ -3391,6 +3391,7 @@ res = phar_orig_compile_file(file_handle, type TSRMLS_CC); } zend_catch { failed = 1; + res = NULL; } zend_end_try(); if (name) { Modified: php/php-src/trunk/ext/phar/phar_object.c =================================================================== --- php/php-src/trunk/ext/phar/phar_object.c 2011-08-07 10:33:58 UTC (rev 314418) +++ php/php-src/trunk/ext/phar/phar_object.c 2011-08-07 11:13:27 UTC (rev 314419) @@ -663,7 +663,7 @@ const char *basename; int fname_len, entry_len, code, index_php_len = 0, not_cgi; phar_archive_data *phar = NULL; - phar_entry_info *info; + phar_entry_info *info = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!s!saz", &alias, &alias_len, &index_php, &index_php_len, &f404, &f404_len, &mimeoverride, &rewrite) == FAILURE) { return; @@ -890,7 +890,7 @@ zend_bailout(); } else { - char *tmp, sa; + char *tmp = NULL, sa = '\0'; sapi_header_line ctr = {0}; ctr.response_code = 301; ctr.line_len = sizeof("HTTP/1.1 301 Moved Permanently")+1; Modified: php/php-src/trunk/ext/phar/util.c =================================================================== --- php/php-src/trunk/ext/phar/util.c 2011-08-07 10:33:58 UTC (rev 314418) +++ php/php-src/trunk/ext/phar/util.c 2011-08-07 11:13:27 UTC (rev 314419) @@ -124,7 +124,7 @@ int phar_seek_efp(phar_entry_info *entry, off_t offset, int whence, off_t position, int follow_links TSRMLS_DC) /* {{{ */ { php_stream *fp = phar_get_efp(entry, follow_links TSRMLS_CC); - off_t temp = 0, eoffset = 0; + off_t temp, eoffset; if (!fp) { return -1; @@ -154,6 +154,8 @@ case SEEK_SET: temp = eoffset + offset; break; + default: + temp = 0; } if (temp > eoffset + (off_t) entry->uncompressed_filesize) { @@ -1203,7 +1205,7 @@ phar_archive_data *fd, **fd_ptr; char *my_realpath, *save; int save_len; - ulong fhash, ahash; + ulong fhash, ahash = 0; phar_request_initialize(TSRMLS_C);