diff options
author | Vlad Krupin <vlad@php.net> | 2002-12-13 03:09:52 +0000 |
---|---|---|
committer | Vlad Krupin <vlad@php.net> | 2002-12-13 03:09:52 +0000 |
commit | e969d788bf95606d635a5226c2bace89e216b464 (patch) | |
tree | 29ad11b1c4739a0d88d02796bc33532ce91882b8 /ext/dbase/dbf_head.c | |
parent | 854b9b9ac1c0741b41999918bf31763bc926c3d6 (diff) | |
download | php-git-e969d788bf95606d635a5226c2bace89e216b464.tar.gz |
Fix for bug 19727. dBase5 (at least for windows) seems to allow 1024 fields
Diffstat (limited to 'ext/dbase/dbf_head.c')
-rw-r--r-- | ext/dbase/dbf_head.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/dbase/dbf_head.c b/ext/dbase/dbf_head.c index e73d134907..afaa0d724d 100644 --- a/ext/dbase/dbf_head.c +++ b/ext/dbase/dbf_head.c @@ -43,13 +43,13 @@ dbhead_t *get_dbf_head(int fd) 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) { |