From: Sean Bright Date: Fri, 21 Dec 2001 03:10:11 +0000 (+0000) Subject: Initialize variable to avoid bogus data and possible segfault. X-Git-Tag: PRE_ISSET_PATCH~464 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33730ca2b9273fe6de184129a1fcdb34ec456030;p=php Initialize variable to avoid bogus data and possible segfault. --- 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) {