vlad Fri Dec 13 11:54:49 2002 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/dbase dbf_head.c
Log:
MFH fix for bug 19727
Index: php4/ext/dbase/dbf_head.c
diff -u php4/ext/dbase/dbf_head.c:1.10 php4/ext/dbase/dbf_head.c:1.10.8.1
--- php4/ext/dbase/dbf_head.c:1.10 Mon Oct 8 17:52:26 2001
+++ php4/ext/dbase/dbf_head.c Fri Dec 13 11:54:49 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