diff options
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r-- | ext/zlib/zlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index ab763c1b11..79c8208583 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -206,7 +206,7 @@ static gzFile *php3_gzopen_with_path(char *filename, char *mode, char *path, cha if(PG(doc_root)) { snprintf(trypath, MAXPATHLEN, "%s%s", PG(doc_root), filename); } else { - strncpy(trypath,filename,MAXPATHLEN); + strlcpy(trypath,filename,sizeof(trypath)); } if (!_php3_checkuid(trypath,2)) { return(NULL); |