Skip to content

Fix GH-16406: Assertion failure in ext/phar/phar.c:2808 #16470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

nielsdos
Copy link
Member

When copying entries during conversion in phar_convert_to_other(), the header offset is not reset. This didn't matter in the past as it wasn't used anyway in the particular use-case, but since 1bb2a4f this is actually used and sanity-checked.

@nielsdos nielsdos linked an issue Oct 16, 2024 that may be closed by this pull request
When copying entries during conversion in phar_convert_to_other(), the
header offset is not reset. This didn't matter in the past as it wasn't
used anyway in the particular use-case, but since 1bb2a4f this is
actually used and sanity-checked.
@nielsdos nielsdos requested a review from cmb69 October 16, 2024 21:10
Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

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

Thank you!

Comment on lines +12 to +14
@unlink($fname . '.tar');
@unlink($fname . '.gz');
@unlink($fname);
Copy link
Member

Choose a reason for hiding this comment

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

These shouldn't be required, but won't hurt.

Copy link
Member Author

Choose a reason for hiding this comment

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

So the reason I added this is because when I was writing the test I first had messed up the clean section, which meant the test wouldn't execute anymore.

@nielsdos nielsdos closed this in 6a8d0a0 Oct 17, 2024
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.

Assertion failure in ext/phar/phar.c:2808
2 participants