summaryrefslogtreecommitdiff
path: root/ext/standard/file.c
diff options
context:
space:
mode:
authorSean Bright <elixer@php.net>2001-12-21 03:10:11 +0000
committerSean Bright <elixer@php.net>2001-12-21 03:10:11 +0000
commit33730ca2b9273fe6de184129a1fcdb34ec456030 (patch)
tree57bbbd50c7ea4bd15ce2e90390028bbefcc1251d /ext/standard/file.c
parent0ca4f69d31f10746df1ce486f50263a607f07d79 (diff)
downloadphp-git-33730ca2b9273fe6de184129a1fcdb34ec456030.tar.gz
Initialize variable to avoid bogus data and possible segfault.
Diffstat (limited to 'ext/standard/file.c')
-rw-r--r--ext/standard/file.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index a590d9c084..389fed1bd4 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -296,7 +296,7 @@ PHP_FUNCTION(get_meta_tags)
int saw_name = 0, saw_content = 0;
char *name = NULL, *value = NULL, *temp = NULL;
php_meta_tags_token tok, tok_last;
- php_meta_tags_data md;
+ php_meta_tags_data md = {NULL, 0, 0, 0, 0, NULL, NULL, 0, 0};
/* Parse arguments */
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b",
@@ -320,11 +320,6 @@ PHP_FUNCTION(get_meta_tags)
tok_last = TOK_EOF;
- md.ulc = 0;
- md.token_data = NULL;
- md.token_len = 0;
- md.in_meta = 0;
-
while (!done && (tok = php_next_meta_token(&md)) != TOK_EOF) {
if (tok == TOK_ID) {
if (tok_last == TOK_OPENTAG) {