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

Remove uncontrolled panics #215

Merged
merged 4 commits into from
Mar 29, 2024
Merged

Remove uncontrolled panics #215

merged 4 commits into from
Mar 29, 2024

Conversation

ThomasHabets
Copy link
Contributor

Libraries shouldn't panic.

This is to fix #214

@jeaye
Copy link
Owner

jeaye commented Mar 29, 2024

Looks good to me. Thanks for following up with a PR.

I have not been working with Rust at all for some years and this lib has suffered from lack of attention. If you're interested in helping out further, the most pressing item is: #209

@jeaye jeaye merged commit 9a9d1d7 into jeaye:master Mar 29, 2024
jeaye added a commit that referenced this pull request Mar 30, 2024
This is a major version bump due to a couple of breaking changes made to
the API. Firstly, the lib itself will no longer panic and will leave any
unwrapping or expecting to API consumers.

#215

Secondly, a security issue related to `instr` and format strings has
been resolved by not only removing `instr` and `mvinstr`, but by
removing string formatting within the lib entirely, for functions such
as `printw`. Format using your normal Rust mechanisms first and just
give it the final string. We always rely on `"%s"` internally now.
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.

Panic trying to set content to a string with a null byte
2 participants