diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index 250ca0556b0..40a32fe59ad 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -633,6 +633,7 @@ notfound: actual_len = entry[0] == '/' ? (entry_len - 1) : entry_len; /* this file is not in the current directory, use the original path */ entry = estrndup(filename, filename_length); + entry_len = filename_length; PHAR_G(cwd) = "/"; PHAR_G(cwd_len) = 0; /* clean path without cwd */