-
Notifications
You must be signed in to change notification settings - Fork 10
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
Audit Clap #49
Comments
Looks like two instances of unsafe: This seems fine, though it looks like an ad-hoc implementation of I think this is fine, although it's extremely not obvious -- I can barely tell what the desired behavior is. |
In the first instance, could |
yeah that whole thing can just be a Box::leak |
I think the latter function needs to be marked |
@KillTheMule nice find! I think this might cause some actual memory unsafety down the line, potentially turning into a privilege escalation vulnerability. Could you file a bug against clap describing the issue? |
I‘ll do so in the next few days. |
I've opened a pull request to replace raw pointers with |
Okay, so it looks like we're going to be making these changes against master? |
This code is identical in 2.33 and master (future 3.0), so I'd start with master and then backport to 2.x series. |
Sounds good. Thanks! |
Opened an issue. Seems a tad more complicated to solve properly, but pretty contained and doable. |
For clarity, the PR is against |
Looks like this should be closed, as all related PRs and issues have been merged or closed? |
Indeed. Thanks! I'll also happily accept a PR adding |
Clap: https://github.com/clap-rs/clap
There is a single unsafe usage according to Cargo Geiger.
The text was updated successfully, but these errors were encountered: