diff options
Diffstat (limited to 'ext/standard/dir.c')
-rw-r--r-- | ext/standard/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/dir.c b/ext/standard/dir.c index e489072e2c..8b6fdc1329 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -449,7 +449,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 (php_check_open_basedir(cwd TSRMLS_CC)) { RETURN_FALSE; |