Repository navigation
Conversation
mb_get_info() returned the mbstring.http_output_conv_mimetypes INI string, for the "http_output_conv_mimetypes" type and in the "all" array, without adding a reference. After ini_set() stores a non-interned value, each call drops one of the INI entry's references, so the string is freed while the entry still points to it and a later ini_get() reads freed memory. With the reference added the returned string can be shared, so drop the @refcount 1 annotation that lets the function JIT destroy a discarded result without checking its refcount. Backport of the refcount part of b621f80 by Gina Peter Banyard.
iliaal
requested review from
alexdowad,
dstogov,
kocsismate and
youkidearitai
as code owners
November 19, 2026 16:08
Member
Author
|
@Girgias Was there a reason why it didn't go into 8.4, if there is a good reason perhaps this PR is not needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After ini_set() stores a runtime value for mbstring.http_output_conv_mimetypes, mb_get_info() returns that string, alone or in the "all" array, without adding a reference, so destroying the result frees the string and a later ini_get() reads freed memory. Add the reference and drop the
@refcount 1annotation, since the result can now be shared with the INI entry. Backport of the refcount part of b621f80 by Gina