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

From: Date: Sun, 18 Aug 2002 07:44:20 +0000
Subject: Re: cvs: php4 /ext/standard file.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13451@lists.php.net to get a copy of this message
> iliaa Sun Aug 18 02:55:33 2002 EDT > > Modified files: > /php4/ext/standard file.c > Log: > Fixed a segmentation fault that would occur if an entry contained a > non-terminated enclosure. Bug #12556 > format your if's like everybody else! if (!strchr(bptr, enclosure)) { } if this is in your own extension, its fine to deviate a little, but in someone elses extension, or ext/standard, please keep to the style guidelines. Otherwise thanks for all these bugfixes of late :) -Sterling > > Index: php4/ext/standard/file.c > diff -u php4/ext/standard/file.c:1.242 php4/ext/standard/file.c:1.243 > --- php4/ext/standard/file.c:1.242 Tue Aug 13 01:08:47 2002 > +++ php4/ext/standard/file.c Sun Aug 18 02:55:32 2002 > @@ -21,7 +21,7 @@ > +----------------------------------------------------------------------+ > */ > > -/* $Id: file.c,v 1.242 2002/08/13 05:08:47 rasmus Exp $ */ > +/* $Id: file.c,v 1.243 2002/08/18 06:55:32 iliaa Exp $ */ > > /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ > > @@ -1991,8 +1991,14 @@ > while(isspace((int) *bptr) && (*bptr!=delimiter)) bptr++; > /* 2. Read field, leaving bptr pointing at start of next field */ > if (enclosure && *bptr == enclosure) { > + bptr++; /* move on to first character in field */ > + > + /* Check if there is an end to the enclosure */ > + if( !strchr(bptr, enclosure) ) { > + continue; > + } > + > /* 2A. handle enclosure delimited field */ > - bptr++; /* move on to first character in field */ > while (*bptr) { > if (*bptr == enclosure) { > /* handle the enclosure */ > > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.cvs (#13451) next »