Bug #6852 Updated: Misc. bugs
| From: | vlad@php.net | Date: | Mon, 31 Dec 2001 10:34:31 +0000 |
| Subject: | Bug #6852 Updated: Misc. bugs | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-75414@lists.php.net to get a copy of this message | ||
ID: 6852
Updated by: vlad
Reported By: kpeters@otaksoft.com
Old Status: Open
Status: Assigned
Bug Type: dBase related
Operating System: FreeBSD 4.0
PHP Version: 4.0.2
Old Assigned To:
Assigned To: vlad
New Comment:
Bug #1 is valid, though I know of applications that add add a null byte there, just like php does.
This seems to be relatively harmless, because most of the apps are smart wnough to recognize that
change, yet it is not in the specs, so it got fixed. Scream if it breaks anything.
Bug #2 is valid, yet as of now there is really no support for .dbt files anyway, so the only
difference that would make is during creation of a new dbf file. Fixed.
Bug #3 - I'm not sure to which revision of the file kpeters refers to, definitely not line 288
anymore:( I need to look into what he meant. Will do so tomorrow.
Assigning to self for now...
Previous Comments:
------------------------------------------------------------------------
[2000-09-24 16:34:42] jmoore@php.net
Please do not report multiple bugs in one report, also please use the short desc in the future, it
is there for a reason, so that people can see immediately what the bug is about. before posting
another bug report please read http://bugs.php.net/bugs-dos-and-donts.php.
Thanks anyway
James
------------------------------------------------------------------------
[2000-09-22 08:21:31] kpeters@otaksoft.com
//------------------------------------------------------
Bug 1
//------------------------------------------------------
dbase.c, line 622 reads:
dbh->db_hlen = sizeof(struct dbf_dhead) + 2 + num_fields * sizeof(struct dbf_dfield);
Should read:
dbh->db_hlen = sizeof(struct dbf_dhead) + 1 + num_fields * sizeof(struct dbf_dfield);
Reason: There is only *one* header record terminator byte (0xD)
//------------------------------------------------------
Bug 2
//------------------------------------------------------
dbase.c, line 683 reads:
cur_f->db_flen = 9;
Should read:
cur_f->db_flen = 10;
Reason: Memo refs in Xbase are always of length 10
//------------------------------------------------------
Bug 3
//------------------------------------------------------
dbase.c, line 288:
Code needs to be inserted below here that truncates the dbf file if deleted records have been
encountered, i.e. if rec_cnt <> new_cnt.
For this, pack_dbf would need to return a 'trunc_required'
flag. Code could also sit in dbf_rec.c function pack_dbf
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=6852&edit=1