Skip to content

[pull] master from php:master #17

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

Open
wants to merge 6,723 commits into
base: master
Choose a base branch
from
Open

[pull] master from php:master #17

wants to merge 6,723 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Mar 14, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

nielsdos and others added 30 commits July 5, 2025 21:31
* PHP-8.3:
  Fix stream double free in phar
* PHP-8.4:
  Fix stream double free in phar
There are two bugfixes here.
The first was a crash that I discovered while working on GH-19035.
The check for when a file pointer was still occupied was wrong, leading
to a UAF. Strangely, zip got this right.

The second issue was that even after fixing the first one, the file
contents were garbage. This is because the file write offset for the
phar stream was wrong.

Closes GH-19038.
* PHP-8.3:
  Fix phar crash and file corruption with SplFileObject
* PHP-8.4:
  Fix phar crash and file corruption with SplFileObject
#19024)

Also check that the callable exists while setting the option
This prevents some strlen computations
To make it easier for IDEs to understand what is going on
This is unnecessary now that the session name is a zend_string
This clarifies intention and uses less bytes in the struct
The `defaultMemoryManager` is only available via a non-public
header and is not supposed to be used by users of the library [1].
It also has a very generic name, further indicating that it is not
supposed to be used.

Instead pass the memory manager explicitly, which is how the library is
supposed to be used.

[1] uriparser/uriparser#52 (comment)
This also omits defining unused HAVE_WINSOCK_H macro when building
ext/sockets.
re2c version 4 enabled some warnings by default. This fixes re2c code
for the `-Wuseless-escape` warnings.

There are two same issues reported.
Issue: GH-17523
Closes: GH-17204
* PHP-8.3:
  Fix -Wuseless-escape warnings emitted by re2c (#19050)
* PHP-8.4:
  Fix -Wuseless-escape warnings emitted by re2c (#19050)
Since `ZSTR_LEN()` returns a `size_t` (unsigned integer), the value can only be either "not equal to 0" or "equal to 0". The third `else` branch was unreachable, making the `*handled_output = NULL;` assignment dead code.
IR commit: af6dc83bcd91c3123f40efcdcbeba8794b9b2abf
* PHP-8.4:
  Update IR
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.