Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upCString::from_vec_unchecked may not need to be `unsafe` #29918
Comments
huonw
added
I-nominated
T-libs
labels
Nov 18, 2015
This comment has been minimized.
This comment has been minimized.
|
The question is if we want to drop the invariant that CString is guarding (no interior nulls). thestinger claims this causes security bugs. It's certainly in the category of problem prevention rather than direct memory safety. |
This comment has been minimized.
This comment has been minimized.
|
The libs team discussed this during triage yesterday and the conclusion was that it is a static contract of the |
alexcrichton
closed this
Nov 19, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
huonw commentedNov 18, 2015
It's not obvious if one can cause memory unsafety with this function: when would an interior null be problematic?
Pointed out by @wthrowe in rust-lang/rfcs#1323 (comment).