summaryrefslogtreecommitdiff
path: root/ext/dbase
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-05-28 23:14:57 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-05-28 23:14:57 +0000
commitde573ba7ff35e1d9f338e574067997745db54352 (patch)
treeeaa51fdc44bb3404d67e1ab274d3e5def9054721 /ext/dbase
parent66526cee92c9e285c0a73e35d5ba09e17e810e9a (diff)
downloadphp-git-de573ba7ff35e1d9f338e574067997745db54352.tar.gz
MFB
Diffstat (limited to 'ext/dbase')
-rw-r--r--ext/dbase/dbf_rec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/dbase/dbf_rec.c b/ext/dbase/dbf_rec.c
index 31a15eded5..cc12985cc1 100644
--- a/ext/dbase/dbf_rec.c
+++ b/ext/dbase/dbf_rec.c
@@ -152,8 +152,7 @@ char *get_field_val(char *rp, dbfield_t *fldp, char *cp)
if ( !cp )
cp = (char *)malloc(flen + 1);
if ( cp ) {
- strncpy(cp, &rp[fldp->db_foffset], flen);
- cp[flen] = 0;
+ strlcpy(cp, &rp[fldp->db_foffset], flen + 1);
}
return cp;
}