Skip to content

Commit f4e04b9

Browse files
committed
fix phar copy-on-write
1 parent 9f1b68e commit f4e04b9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/phar/phar_object.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3421,6 +3421,7 @@ PHP_METHOD(Phar, copy)
34213421
}
34223422
}
34233423

3424+
tmp_len = (int)newfile_len;
34243425
if (phar_path_check(&newfile, &tmp_len, &pcr_error) > pcr_is_ok) {
34253426
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC,
34263427
"file \"%s\" contains invalid characters %s, cannot be copied from \"%s\" in phar %s", newfile, pcr_error, oldfile, phar_obj->archive->fname);

0 commit comments

Comments
 (0)