summaryrefslogtreecommitdiff
path: root/ext/fdf
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-12-28 20:45:20 +0000
committerAntony Dovgal <tony2001@php.net>2006-12-28 20:45:20 +0000
commitbef17c425a767099bb011b294b1abbc34025a7d3 (patch)
tree4a9a7eed956d286cab70259458e3bbd88f96a94b /ext/fdf
parentfc9b8ae1a3f7d4150ae1ce0a08d3f00c0cfb950b (diff)
downloadphp-git-bef17c425a767099bb011b294b1abbc34025a7d3.tar.gz
use strlcpy()
Diffstat (limited to 'ext/fdf')
-rw-r--r--ext/fdf/fdf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/fdf/fdf.c b/ext/fdf/fdf.c
index c337467fea..842fd54c83 100644
--- a/ext/fdf/fdf.c
+++ b/ext/fdf/fdf.c
@@ -1726,8 +1726,7 @@ PHP_FUNCTION(fdf_get_attachment) {
RETURN_FALSE;
}
- strncpy(pathbuf , savepath, MAXPATHLEN-1);
- pathbuf[MAXPATHLEN-1] = '\0';
+ strlcpy(pathbuf, savepath, sizeof(pathbuf));
if(0 == stat(pathbuf, &statBuf)) {
is_dir = S_ISDIR(statBuf.st_mode);