Skip to content

Add missing realloc validation in string transcoding#13026

Merged
alexcrichton merged 1 commit intobytecodealliance:mainfrom
alexcrichton:fix-missing-realloc
Apr 9, 2026
Merged

Add missing realloc validation in string transcoding#13026
alexcrichton merged 1 commit intobytecodealliance:mainfrom
alexcrichton:fix-missing-realloc

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

This commit adds a missing validation that a return value of realloc is inbounds during string transcoding. This was accidentally missing on the transcoding path from utf8 to latin1+utf16 which meant that a nearly-raw pointer could get passed to the host to perform the transcode.

This commit adds a missing validation that a return value of `realloc`
is inbounds during string transcoding. This was accidentally missing on
the transcoding path from `utf8` to `latin1+utf16` which meant that a
nearly-raw pointer could get passed to the host to perform the
transcode.
@alexcrichton alexcrichton requested a review from a team as a code owner April 9, 2026 20:40
@alexcrichton alexcrichton requested review from dicej and removed request for a team April 9, 2026 20:40
@alexcrichton alexcrichton enabled auto-merge April 9, 2026 20:42
@alexcrichton alexcrichton added this pull request to the merge queue Apr 9, 2026
Merged via the queue into bytecodealliance:main with commit f2bde1e Apr 9, 2026
48 checks passed
@alexcrichton alexcrichton deleted the fix-missing-realloc branch April 9, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants