diff options
| author | Antony Dovgal <tony2001@php.net> | 2006-12-28 20:45:27 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2006-12-28 20:45:27 +0000 |
| commit | e5f95ec3e4dfaab75be9537feae226ef33e021a6 (patch) | |
| tree | ce34e1693b2113709b603c58269252e99401390b /ext/fdf | |
| parent | 559ab4b3f9b3055daffd4e50bbee6a5b2405707a (diff) | |
| download | php-git-e5f95ec3e4dfaab75be9537feae226ef33e021a6.tar.gz | |
MFH
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 e991d4cf34..81c23bd34b 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); |
