|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45102 Corrupting dbf files
Submitted: 2008-05-27 05:27 UTC Modified: 2008-11-18 01:00 UTC
Avg. Score:4.8 ± 0.4
Reproduced:11 of 11 (100.0%)
Same Version:9 (81.8%)
Same OS:3 (27.3%)
From: Eugene dot Migalin at pcmp dot ru Assigned:
Status: No Feedback Package: dBase related
PHP Version: 5.2.6 OS: Linux (Fedora 8)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: Eugene dot Migalin at pcmp dot ru
New email:
PHP Version: OS:


 [2008-05-27 05:27 UTC] Eugene dot Migalin at pcmp dot ru
after putting data into a dbase file using function dbase_add_record() the dbase file gets corrupted.
The bug has been located in php-5.2.6/ext/dbase/dbf_head.c at:
1. line 202:
shoud be
dbfield.dbf_flen[0] = 8;
dbfield.dbf_flen[1] = 0;
as is
dbf->db_flen = 8;

2. line 205:
shoud be
dbfield.dbf_flen[0] = 1;
dbfield.dbf_flen[1] = 0;
as is
dbf->db_flen = 1;

Reproduce code:
any code using dbase_add_record() with a dbase file containing Date or(and) Logical fields 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-25 13:32 UTC] pg23193+php at sgh dot waw dot pl
Dbase file header gets corrupted like in #42261
 [2008-11-10 14:24 UTC]
Please try using this CVS snapshot:
For Windows:

 [2008-11-18 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 28 04:01:27 2024 UTC