#45102 [NEW]: Corrupting dbf files

From: Date: Tue, 27 May 2008 05:27:13 +0000
Subject: #45102 [NEW]: Corrupting dbf files
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-125289@lists.php.net to get a copy of this message
From: Eugene dot Migalin at pcmp dot ru Operating system: Linux (Fedora 8) PHP version: 5.2.6 PHP Bug Type: dBase related Bug description: Corrupting dbf files 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 bug report at http://bugs.php.net/?id=45102&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45102&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45102&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45102&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45102&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45102&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45102&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45102&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45102&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45102&r=support Expected behavior: http://bugs.php.net/fix.php?id=45102&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45102&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45102&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45102&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45102&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45102&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45102&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45102&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45102&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45102&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45102&r=mysqlcfg

« previous php.bugs (#125289) next »