Re: cvs: php4 /ext/dbase dbf_head.c

From: Date: Fri, 13 Dec 2002 09:08:36 +0000
Subject: Re: cvs: php4 /ext/dbase dbf_head.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-17204@lists.php.net to get a copy of this message
On Fri, 13 Dec 2002, Vlad Krupin wrote: > vlad Thu Dec 12 22:09:53 2002 EDT > > Modified files: > /php4/ext/dbase dbf_head.c > Log: > Fix for bug 19727. dBase5 (at least for windows) seems to allow 1024 fields MFH? > > > Index: php4/ext/dbase/dbf_head.c > diff -u php4/ext/dbase/dbf_head.c:1.10 php4/ext/dbase/dbf_head.c:1.11 > --- php4/ext/dbase/dbf_head.c:1.10 Mon Oct 8 17:52:26 2001 > +++ php4/ext/dbase/dbf_head.c Thu Dec 12 22:09:52 2002 > @@ -43,13 +43,13 @@ > dbhead.dbh_date[DBH_DATE_DAY]); > > /* malloc enough memory for the maximum number of fields: > - 32 * 254 = 8128 bytes */ > - tdbf = (dbfield_t *)malloc(sizeof(dbfield_t)*254); > + 32 * 1024 = 32K dBase5 (for Win) seems to allow that many */ > + tdbf = (dbfield_t *)malloc(sizeof(dbfield_t)*1024); > > offset = 1; > nfields = 0; > gf_retval = 0; > - for (cur_f = tdbf; gf_retval < 2 && nfields < 254; cur_f++) { > + for (cur_f = tdbf; gf_retval < 2 && nfields < 1024; cur_f++) { > gf_retval = get_dbf_field(dbh, cur_f); > > if (gf_retval < 0) { > > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- ------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ -------------------------------------------------------------------------

« previous php.cvs (#17204) next »