Skip to content

Guard against malformed UTF16 environment variables or command line arguments#53

Merged
will-velazquez merged 1 commit into
masterfrom
fix/will/invalid-utf16-env
May 29, 2026
Merged

Guard against malformed UTF16 environment variables or command line arguments#53
will-velazquez merged 1 commit into
masterfrom
fix/will/invalid-utf16-env

Conversation

@will-velazquez

Copy link
Copy Markdown

This doesn't quite match Apple behaviour - on there we still construct NSString instances with malformed data, but that's liable to cause a crash or unexpected behaviour elsewhere, like when converting to UTF8.
Instead, silently skip adding these to the environment block. If there's malformed data in there, we likely don't want to use it anyways.

…rguments

This doesn't quite match Apple behaviour - on there we still construct NSString instances with malformed data, but that's liable to cause a crash or unexpected behaviour elsewhere, like when converting to UTF8.
Instead, silently skip adding these to the environment block. If there's malformed data in there, we likely don't want to use it anyways.
@will-velazquez will-velazquez merged commit ce9eeb7 into master May 29, 2026
2 of 10 checks passed
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