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

to_wide_null should return an error if the input contains any null characters #6

Open
CodesInChaos opened this issue Sep 5, 2016 · 0 comments

Comments

@CodesInChaos
Copy link

Change the result type of to_wide_null to Result<Vec<u16>, NulError>, matching CString::new.

Without this error you get silent truncation when passing data to an API which expects null terminated strings. This can easily result in security holes.

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

No branches or pull requests

1 participant