summaryrefslogtreecommitdiff
path: root/ext/dbase
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-05-16 13:17:50 +0000
committerAntony Dovgal <tony2001@php.net>2007-05-16 13:17:50 +0000
commit3a10e5c0786d522ac0519624c7a028bc0cebbddb (patch)
tree1436d8f9ddb3617ff740d92ed60ba0abd93b7c91 /ext/dbase
parent09a575a20fd47c506f1cb4d0365f8cff2904fcba (diff)
downloadphp-git-3a10e5c0786d522ac0519624c7a028bc0cebbddb.tar.gz
MFH: fix #41394 (dbase_create creates file with corrupted header)
Diffstat (limited to 'ext/dbase')
-rw-r--r--ext/dbase/dbf_head.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/dbase/dbf_head.c b/ext/dbase/dbf_head.c
index 0f9ad61461..33e3a425d7 100644
--- a/ext/dbase/dbf_head.c
+++ b/ext/dbase/dbf_head.c
@@ -184,7 +184,7 @@ int put_dbf_field(dbhead_t *dbh, dbfield_t *dbf)
/* 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 @@ void put_dbf_info(dbhead_t *dbh)
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);