php.net |  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
Votes:12
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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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
Description:
------------
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 


Patches

Pull Requests

History

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] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [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: Mon Dec 30 14:01:28 2024 UTC