Re: cvs: php4 /ext/standard file.c

From: Date: Fri, 21 Dec 2001 03:09:50 +0000
Subject: Re: cvs: php4 /ext/standard file.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-8737@lists.php.net to get a copy of this message
> elixer Thu Dec 20 22:10:12 2001 EDT > > Modified files: > /php4/ext/standard file.c > Log: > Initialize variable to avoid bogus data and possible segfault. > The patch seems bad -- you don't want to initialize a structure like that as it is *way* too dependent on field ordering. -Sterling > > Index: php4/ext/standard/file.c > diff -u php4/ext/standard/file.c:1.200 php4/ext/standard/file.c:1.201 > --- php4/ext/standard/file.c:1.200 Thu Dec 20 20:53:25 2001 > +++ php4/ext/standard/file.c Thu Dec 20 22:10:11 2001 > @@ -21,7 +21,7 @@ > +----------------------------------------------------------------------+ > */ > > -/* $Id: file.c,v 1.200 2001/12/21 01:53:25 elixer Exp $ */ > +/* $Id: file.c,v 1.201 2001/12/21 03:10:11 elixer Exp $ */ > > /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ > > @@ -296,7 +296,7 @@ > 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", > @@ -319,11 +319,6 @@ > array_init(return_value); > > 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) { > > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net > For additional commands, e-mail: php-cvs-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.cvs (#8737) next »