summaryrefslogtreecommitdiff
path: root/ext/phar/util.c
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2017-07-26 10:47:02 +0100
committerJoe Watkins <krakjoe@php.net>2017-07-26 10:47:22 +0100
commitbb9ea4e88b14ab9ae51370c6265d8a88c8532937 (patch)
treec71bd4fb650d408ea0364859ebe74025392d8ae6 /ext/phar/util.c
parent747f5b23ae226c2c700d68f05178ff1085939dfa (diff)
parent6b1fbafdf0590ec293968d38c78641283b119848 (diff)
downloadphp-git-bb9ea4e88b14ab9ae51370c6265d8a88c8532937.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fix bug #74991 - include_path has a 4096 char (minus "__DIR__:") limit, in some PHAR cases
Diffstat (limited to 'ext/phar/util.c')
-rw-r--r--ext/phar/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/phar/util.c b/ext/phar/util.c
index 803543d391..64a659d54d 100644
--- a/ext/phar/util.c
+++ b/ext/phar/util.c
@@ -309,7 +309,7 @@ splitted:
efree(test);
}
- spprintf(&path, MAXPATHLEN, "phar://%s/%s%c%s", arch, PHAR_G(cwd), DEFAULT_DIR_SEPARATOR, PG(include_path));
+ spprintf(&path, MAXPATHLEN + 1 + strlen(PG(include_path)), "phar://%s/%s%c%s", arch, PHAR_G(cwd), DEFAULT_DIR_SEPARATOR, PG(include_path));
efree(arch);
ret = php_resolve_path(filename, filename_len, path);
efree(path);