Skip to content

ext/phar: Minor refactorings#20162

Merged
Girgias merged 11 commits into
php:masterfrom
Girgias:phar-zend-result
Oct 15, 2025
Merged

ext/phar: Minor refactorings#20162
Girgias merged 11 commits into
php:masterfrom
Girgias:phar-zend-result

Conversation

@Girgias
Copy link
Copy Markdown
Member

@Girgias Girgias commented Oct 13, 2025

Pulls various changes out of #19356 and expanded on them.

Comment thread ext/phar/phar.c Outdated
Comment thread ext/phar/phar.c Outdated
Comment thread ext/phar/util.c Outdated
Comment thread ext/phar/phar_internal.h
Comment thread ext/phar/phar_object.c
zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0,
"Invalid argument, extraction path must be non-zero length");
RETURN_THROWS();
}

if (pathto_len >= MAXPATHLEN) {
char *tmp = estrndup(pathto, 50);
if (ZSTR_LEN(path_to) >= MAXPATHLEN) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: this error branch can avoid allocation

@Girgias Girgias requested a review from ndossche October 15, 2025 12:50
@Girgias Girgias merged commit 264d650 into php:master Oct 15, 2025
10 checks passed
@Girgias Girgias deleted the phar-zend-result branch October 15, 2025 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants