diff options
| author | Antony Dovgal <tony2001@php.net> | 2006-12-28 20:45:20 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2006-12-28 20:45:20 +0000 |
| commit | bef17c425a767099bb011b294b1abbc34025a7d3 (patch) | |
| tree | 4a9a7eed956d286cab70259458e3bbd88f96a94b /ext/fdf | |
| parent | fc9b8ae1a3f7d4150ae1ce0a08d3f00c0cfb950b (diff) | |
| download | php-git-bef17c425a767099bb011b294b1abbc34025a7d3.tar.gz | |
use strlcpy()
Diffstat (limited to 'ext/fdf')
| -rw-r--r-- | ext/fdf/fdf.c | 3 |
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); |
