From 6b1fbafdf0590ec293968d38c78641283b119848 Mon Sep 17 00:00:00 2001 From: "Benjamin W. Broersma" Date: Wed, 26 Jul 2017 08:16:37 +0200 Subject: Fix bug #74991 - include_path has a 4096 char (minus "__DIR__:") limit, in some PHAR cases --- ext/phar/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/phar/util.c') diff --git a/ext/phar/util.c b/ext/phar/util.c index f571429bee..54ff13b5c0 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -316,7 +316,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); -- cgit v1.2.1