diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2007-05-28 23:14:57 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2007-05-28 23:14:57 +0000 |
commit | de573ba7ff35e1d9f338e574067997745db54352 (patch) | |
tree | eaa51fdc44bb3404d67e1ab274d3e5def9054721 /ext/dbase | |
parent | 66526cee92c9e285c0a73e35d5ba09e17e810e9a (diff) | |
download | php-git-de573ba7ff35e1d9f338e574067997745db54352.tar.gz |
MFB
Diffstat (limited to 'ext/dbase')
-rw-r--r-- | ext/dbase/dbf_rec.c | 3 |
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; } |