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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Tue Apr 16 04:01:27 2024 UTC