tony2001 Wed May 16 13:17:50 2007 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/ext/dbase dbf_head.c Log: MFH: fix #41394 (dbase_create creates file with corrupted header) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.707&r2=1.2027.2.547.2.708&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.707 php-src/NEWS:1.2027.2.547.2.708 --- php-src/NEWS:1.2027.2.547.2.707 Wed May 16 12:54:30 2007 +++ php-src/NEWS Wed May 16 13:17:50 2007 @@ -12,6 +12,7 @@ - Fixed segfault in strripos(). (Tony, Joxean Koret) - Fixed bug #41403 (json_decode cannot decode floats if localeconv decimal_point is not '.'). (Tony) +- Fixed bug #41394 (dbase_create creates file with corrupted header). (Tony) - Fixed bug #41390 (Clarify error message with invalid protocol scheme). (Scott) - Fixed bug #41378 (fastcgi protocol lacks support for Reason-Phrase in http://cvs.php.net/viewvc.cgi/php-src/ext/dbase/dbf_head.c?r1=1.14.4.1.2.5&r2=1.14.4.1.2.6&diff_format=u Index: php-src/ext/dbase/dbf_head.c diff -u php-src/ext/dbase/dbf_head.c:1.14.4.1.2.5 php-src/ext/dbase/dbf_head.c:1.14.4.1.2.6 --- php-src/ext/dbase/dbf_head.c:1.14.4.1.2.5 Sat Feb 24 18:00:43 2007 +++ php-src/ext/dbase/dbf_head.c Wed May 16 13:17:50 2007 @@ -184,7 +184,7 @@ /* build the on disk field info */ scp = dbf->db_fname; dcp = dbfield.dbf_name; - strlcpy(dbfield.dbf_name, dbf->db_fname, DBF_NAMELEN); + strlcpy(dbfield.dbf_name, dbf->db_fname, DBF_NAMELEN + 1); dbfield.dbf_type = dbf->db_type; switch (dbf->db_type) { @@ -215,7 +215,7 @@ int fcnt; if ((cp = db_cur_date(NULL))) { - strlcpy(dbh->db_date, cp, 8); + strlcpy(dbh->db_date, cp, 9); free(cp); } put_dbf_head(dbh);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php