#45102 [Opn->Fbk]: Corrupting dbf files
| From: | jani@php.net | Date: | Mon, 10 Nov 2008 14:24:24 +0000 |
| Subject: | #45102 [Opn->Fbk]: Corrupting dbf files | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-130841@lists.php.net to get a copy of this message | ||
ID: 45102
Updated by: jani@php.net
Reported By: Eugene dot Migalin at pcmp dot ru
-Status: Open
+Status: Feedback
Bug Type: dBase related
Operating System: Linux (Fedora 8)
PHP Version: 5.2.6
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2008-06-25 13:32:53] pg23193+php at sgh dot waw dot pl
Dbase file header gets corrupted like in #42261
------------------------------------------------------------------------
[2008-05-27 05:27:13] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45102&edit=1