From: Christoph M. Becker Date: Tue, 8 Oct 2019 07:50:43 +0000 (+0200) Subject: Merge branch 'PHP-7.4' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9be4622c86b4c0ca0f36f03d65e93e57b798a0e;p=php Merge branch 'PHP-7.4' * PHP-7.4: Fix #78641: addGlob can modify given remove_path value --- e9be4622c86b4c0ca0f36f03d65e93e57b798a0e diff --cc ext/zip/php_zip.c index d30ad8747f,966efb58e6..e4fcc362ec --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@@ -1601,8 -1681,7 +1602,8 @@@ static void php_zip_add_from_pattern(IN if (remove_path && remove_path_len > 1) { size_t real_len = strlen(remove_path); if ((real_len > 1) && ((remove_path[real_len - 1] == '/') || (remove_path[real_len - 1] == '\\'))) { - remove_path[real_len - 1] = '\0'; + remove_path = estrndup(remove_path, real_len - 1); + remove_path_len -= 1; } }