-
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove use of
from_utf8_unchecked
in macos process handling
Those unsafe functions have been observed to not respect their safety constraints, as some values retrieved from the macos API are not guaranteed to be UTF-8. This is fixed by replacing those calls with `from_utf8_lossy`, which will replace those values with a replacement character to ensure the generated String is valid. This solution is not ideal, but the master branch contains the better fix: an OsString is returned to let the caller decide how to handle the value. Changing those calls remove the need of unsafe blocks, so those were removed at the same time.
- Loading branch information
Showing
1 changed file
with
28 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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