File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -935,8 +935,10 @@ impl CStr {
935
935
/// Wraps a raw C string with a safe C string wrapper.
936
936
///
937
937
/// This function will wrap the provided `ptr` with a `CStr` wrapper, which
938
- /// allows inspection and interoperation of non-owned C strings. This method
939
- /// is unsafe for a number of reasons:
938
+ /// allows inspection and interoperation of non-owned C strings. The total
939
+ /// size of the raw C string must be smaller than `isize::MAX` **bytes**
940
+ /// in memory due to calling the `slice::from_raw_parts` function.
941
+ /// This method is unsafe for a number of reasons:
940
942
///
941
943
/// * There is no guarantee to the validity of `ptr`.
942
944
/// * The returned lifetime is not guaranteed to be the actual lifetime of
You can’t perform that action at this time.
0 commit comments