Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace String with OsString in get_shell_item_display_name #2

Merged
merged 1 commit into from
Jul 21, 2020

Conversation

maroider
Copy link
Contributor

@maroider maroider commented Jul 20, 2020

The string which get_shell_item_display_name extracts may contain malformed UTF-16. OsString can handle malformed UTF-16 losslessly.

I encountered a panic due to the .unwrap() on line 541 while testing the correctness of the changes made to balthild/native-dialog-rs in response to native-dialog-rs/native-dialog-rs#3. The code used to trigger the panic can be found here.

The string which `get_shell_item_display_name` extracts may contain
malformed UTF-16. `OsString` can handle malformed UTF-16 losslessly.
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.

None yet

2 participants