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

From: Date: Fri, 13 Dec 2002 16:59:56 +0000
Subject: Re: cvs: php4 /ext/dbase dbf_head.c
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-17211@lists.php.net to get a copy of this message
I thought this RC was only for fixing critical and crash bugs. This bug was neither - probably one person in the whole universe ever hit this limitation. I MFH'ed it by popular request :) Vlad Jani Taskinen wrote:
MFH!!! 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 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) {


« previous php.cvs (#17211) next »