Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions ext/phar/phar_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -4315,10 +4315,7 @@ PHP_METHOD(Phar, extractTo)
}

if (ZSTR_LEN(path_to) >= MAXPATHLEN) {
char *tmp = estrndup(ZSTR_VAL(path_to), 50);
/* truncate for error message */
zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Cannot extract to \"%s...\", destination directory is too long for filesystem", tmp);
efree(tmp);
zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Cannot extract to \"%.50s...\", destination directory is too long for filesystem", ZSTR_VAL(path_to));
RETURN_THROWS();
}

Expand Down