Repository navigation
fix(libc): reject invalid UTF-8 in wide formatting - #2109
Closed
STUPIDCONTEM wants to merge 1 commit into
Closed
STUPIDCONTEM wants to merge 1 commit into
STUPIDCONTEM wants to merge 1 commit into
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
This was referenced Oct 9, 2026
Collaborator
|
Closing: no title is shown passing malformed UTF-8 to these functions, and the change turns output that works on main into a -1 for any title that does. If a title stops on this, please reopen with its ID and the log line. |
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.
Evidence review (2026-10-09)
Closed by maintainer; not ready to reopen. Required evidence: Title ID and a log showing malformed UTF-8 in wide formatting causes a real failure; stricter rejection may break working output.
Game/title ID: none verified. No PS5 title execution is claimed.
What
Reject malformed UTF-8 in narrow
%sarguments to the guest wide formatter. The decoder previously copied invalid bytes or accepted overlong sequences, encoded surrogates and values above U+10FFFF.vswprintfandwprintfnow return failure with guest EILSEQ (86);snwprintf_shandles the encoding error through its existing Annex K constraint-failure path. Remove the resolved encoding issue from TechnicalDebt while retaining the other secure-formatter limitations.FreeBSD stable/11 vfwprintf.c treats failed multibyte
%sconversion as an error. This retains the project's existing UTF-8 conversion policy and UTF-16 precision units. It does not change locale selection or wide%lsconversion.Tested
Windows 10 Pro 19045, WinLibs GCC 15.2 UCRT posix SEH r7, Release, BUILD_TESTING=ON, main 6cc0503.
%sconversion succeeds. After the fix, three focused runs pass for invalid lead/continuation bytes, overlong encodings, surrogates, out-of-range values and truncated sequences. All three affected entry points are exercised.No Linux or title execution is claimed for this new correction. Conventions, whitespace and test registration checked before publication.
Checklist