Skip to content

master: part of the mbstring bailout fix got lost in a merge #24489

Open

Description

@dev-null-undefined

The PHP-8.6 into master merge 9705fda dropped this hunk from mb_convert_buf_ensure() in ext/mbstring/libmbfl/mbfl/mbfl_encoding.h. It also dropped the test ext/mbstring/tests/oom_buf_growth.phpt:

 		if (!newstr) {
+			/* An earlier growth may have moved the buffer. */
+			buf->out = *out;
+			buf->limit = *limit;
 			return FAILURE;
 		}

Both are on PHP-8.6 but missing on master. git diff origin/master origin/PHP-8.6 -- ext/mbstring/libmbfl/mbfl/mbfl_encoding.h shows only this hunk, and git show --remerge-diff 9705fda1bb -- ext/mbstring shows the merge removing it. I'm guessing it was an accident during conflict resolution. Re-applying the three lines and restoring the test from PHP-8.6 should be all that's needed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions