From 34928eeecaee7693f56ac73f315edb7c841fbc6b Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sat, 24 Feb 2007 17:16:23 +0000 Subject: [PATCH] strncpy > strlcpy --- ext/standard/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/dir.c b/ext/standard/dir.c index fd8b4140cb0..9159ac8d6eb 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -422,7 +422,7 @@ PHP_FUNCTION(glob) /* we assume that any glob pattern will match files from one directory only so checking the dirname of the first match should be sufficient */ - strncpy(cwd, globbuf.gl_pathv[0], MAXPATHLEN); + strlcpy(cwd, globbuf.gl_pathv[0], MAXPATHLEN); if (PG(safe_mode) && (!php_checkuid(cwd, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { RETURN_FALSE; }