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

Zero first byte of CString on drop #36264

Merged
merged 2 commits into from
Sep 13, 2016
Merged

Commits on Sep 7, 2016

  1. Zero first byte of CString on drop

    This should prevent code like
    
    ```
    let ptr = CString::new("hello").unwrap().as_ptr();
    ```
    
    from working by accident.
    matklad committed Sep 7, 2016
    Configuration menu
    Copy the full SHA
    04b776e View commit details
    Browse the repository at this point in the history
  2. Add a test for CString drop

    matklad committed Sep 7, 2016
    Configuration menu
    Copy the full SHA
    f9a3408 View commit details
    Browse the repository at this point in the history