Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open Beginner friendly
#24,489 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@lazerg is already working on this.

Since Oct 22, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
c, php
Domain
backend

Research direction

Read ext/mbstring/libmbfl/mbfl/mbfl_encoding.h and compare the mb_convert_buf_ensure() hunk with PHP-8.6; inspect the referenced merge diff for how it was dropped. Restore the missing test from PHP-8.6 at ext/mbstring/tests/oom_buf_growth.phpt and run that test. Done when master contains the three buffer updates and the test, matching PHP-8.6.

Written by the indexing model from the issue text.

Description

The PHP-8.6 into master merge 9705fda1bb 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.

Dominant language
C
Stars
40.7k
Forks
8.3k
Avg merge
2d 15h
Merged PRs (30d)
155

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from php/php-src

All issues in php/php-src

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.