1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02:00

strncpy > strlcpy

This commit is contained in:
Ilia Alshanetsky
2007-02-24 17:16:23 +00:00
parent 0ccf1cf9ce
commit 34928eeeca
+1 -1
View File
@@ -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;
}