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 {
935935 /// Wraps a raw C string with a safe C string wrapper.
936936 ///
937937 /// 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:
940942 ///
941943 /// * There is no guarantee to the validity of `ptr`.
942944 /// * The returned lifetime is not guaranteed to be the actual lifetime of
You can’t perform that action at this time.
0 commit comments